<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>BrokenIRC: include/server.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">BrokenIRC
   &#160;<span id="projectnumber">0.0.42</span>
   </div>
   <div id="projectbrief">A &#39;not so functionnal&#39; irc server and a WIP client</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">server.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;stdio.h&gt;</code><br />
<code>#include &lt;netdb.h&gt;</code><br />
<code>#include &lt;string.h&gt;</code><br />
<code>#include &lt;sys/socket.h&gt;</code><br />
<code>#include &lt;sys/epoll.h&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for server.h:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h__incl.png" border="0" usemap="#include_2server_8h" alt=""/></div>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h__dep__incl.png" border="0" usemap="#include_2server_8hdep" alt=""/></div>
<map name="include_2server_8hdep" id="include_2server_8hdep">
<area shape="rect" id="node2" href="channel__list_8c.html" title="server_src/channel\l_list.c" alt="" coords="5,80,137,121"/>
<area shape="rect" id="node3" href="commands__parsing_8c.html" title="server_src/commands\l_parsing.c" alt="" coords="161,80,312,121"/>
<area shape="rect" id="node4" href="lists__helpers_8c.html" title="server_src/lists_helpers.c" alt="" coords="337,87,507,114"/>
<area shape="rect" id="node5" href="logs__helpers_8c.html" title="server_src/logs_helpers.c" alt="" coords="531,87,702,114"/>
<area shape="rect" id="node6" href="rfc__cmds0_8c.html" title="server_src/rfc_cmds0.c" alt="" coords="727,87,885,114"/>
<area shape="rect" id="node7" href="rfc__cmds1_8c.html" title="server_src/rfc_cmds1.c" alt="" coords="909,87,1068,114"/>
<area shape="rect" id="node8" href="server__decls_8c.html" title="server_src/server_decls.c" alt="" coords="1092,87,1264,114"/>
<area shape="rect" id="node9" href="server__init_8c.html" title="server_src/server_init.c" alt="" coords="1288,87,1447,114"/>
<area shape="rect" id="node10" href="server__main_8c.html" title="server_src/server_main.c" alt="" coords="1471,87,1640,114"/>
<area shape="rect" id="node11" href="sig__handler_8c.html" title="server_src/sig_handler.c" alt="" coords="1664,87,1828,114"/>
<area shape="rect" id="node12" href="user__list_8c.html" title="server_src/user_list.c" alt="" coords="1853,87,1999,114"/>
</map>
</div>
</div>
<p><a href="server_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structt__log.html">t_log</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structt__serv.html">t_serv</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structt__user.html">t_user</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structt__userlist.html">t_userlist</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structt__channel.html">t_channel</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:aeefbbafa97642defe3ee6c3080b7d66f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#aeefbbafa97642defe3ee6c3080b7d66f">BACKLOG</a>&#160;&#160;&#160;5</td></tr>
<tr class="separator:aeefbbafa97642defe3ee6c3080b7d66f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9880cfe1f4eb3140da2095fd081282f5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a9880cfe1f4eb3140da2095fd081282f5">REF_NB</a>&#160;&#160;&#160;15</td></tr>
<tr class="separator:a9880cfe1f4eb3140da2095fd081282f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6821bafc3c88dfb2e433a095df9940c6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a6821bafc3c88dfb2e433a095df9940c6">BUF_SIZE</a>&#160;&#160;&#160;1060</td></tr>
<tr class="separator:a6821bafc3c88dfb2e433a095df9940c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae42954bb8545d24e3e9dcde5920c9a0b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#ae42954bb8545d24e3e9dcde5920c9a0b">MAX_EVENTS</a>&#160;&#160;&#160;10</td></tr>
<tr class="separator:ae42954bb8545d24e3e9dcde5920c9a0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b38553235fff093729b446c1e46231c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a2b38553235fff093729b446c1e46231c">MAXCHAN</a>&#160;&#160;&#160;1000</td></tr>
<tr class="separator:a2b38553235fff093729b446c1e46231c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adeb606407e063430174e4903a0d80c2b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#adeb606407e063430174e4903a0d80c2b">MAXCHANNAME</a>&#160;&#160;&#160;50</td></tr>
<tr class="separator:adeb606407e063430174e4903a0d80c2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41101847771d39a4f0a7f9395061c629"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a41101847771d39a4f0a7f9395061c629">MAXARGS</a>&#160;&#160;&#160;15</td></tr>
<tr class="separator:a41101847771d39a4f0a7f9395061c629"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0122c358494825a5050009adfff9fc0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#ab0122c358494825a5050009adfff9fc0">MAXARGSIZE</a>&#160;&#160;&#160;33</td></tr>
<tr class="separator:ab0122c358494825a5050009adfff9fc0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b912ed39df233b43d7a093814705afb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a2b912ed39df233b43d7a093814705afb">EVER</a>&#160;&#160;&#160;;;</td></tr>
<tr class="separator:a2b912ed39df233b43d7a093814705afb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41f9c5fb8b08eb5dc3edce4dcb37fee7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a41f9c5fb8b08eb5dc3edce4dcb37fee7">true</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:a41f9c5fb8b08eb5dc3edce4dcb37fee7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65e9886d74aaee76545e83dd09011727"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a65e9886d74aaee76545e83dd09011727">false</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:a65e9886d74aaee76545e83dd09011727"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:acfbe918d8821ff3d1d8dc2c90bb8f6a2"><td class="memItemLeft" align="right" valign="top">typedef char **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#acfbe918d8821ff3d1d8dc2c90bb8f6a2">cmdargs</a></td></tr>
<tr class="separator:acfbe918d8821ff3d1d8dc2c90bb8f6a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa62dc6ab378205892df275c6df156dba"><td class="memItemLeft" align="right" valign="top">typedef struct addrinfo&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#aa62dc6ab378205892df275c6df156dba">adrinf</a></td></tr>
<tr class="separator:aa62dc6ab378205892df275c6df156dba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc9c1e6f561b7500f7ecb3813d272d20"><td class="memItemLeft" align="right" valign="top">typedef void *(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#abc9c1e6f561b7500f7ecb3813d272d20">cmds</a>) (<a class="el" href="server_8h.html#acfbe918d8821ff3d1d8dc2c90bb8f6a2">cmdargs</a> args, int clifd, <a class="el" href="structt__channel.html">t_channel</a> *chanlist)</td></tr>
<tr class="separator:abc9c1e6f561b7500f7ecb3813d272d20"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:abfa4cf7a25ca27eb109ef9065f30581f"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581f">CMDS</a> { <br />
&#160;&#160;<a class="el" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa4925a399dab94b9b58f6d1b5cd246af7">JOIN</a>, 
<a class="el" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa3e724a44d5e55b043a1c6ba83aa08bea">NICK</a>, 
<a class="el" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa3a95ef902bc659901cceef98e0bc8041">PING</a>, 
<a class="el" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fae2d30a195cee6b2961cc2c23ea4b520b">USER</a>, 
<br />
&#160;&#160;<a class="el" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa76bdc8adfd6c6463ab269ff4c06be9b4">QUIT</a>, 
<a class="el" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa67c96b24b23bcb408bae7626730a04b7">SERVER</a>, 
<a class="el" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa173f98c603042f6241b70157d56e385f">PART</a>, 
<a class="el" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa2009451f58075e636458d7149da4488a">USERS</a>, 
<br />
&#160;&#160;<a class="el" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581faa96582524abaa2ba9ee6ba926dee5262">NAMES</a>, 
<a class="el" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa5946189c2ff16a177f8d6266b96ea30e">ACCEPTF</a>, 
<a class="el" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa7bdf7243edf3c972e0fbc08bd0d4079d">MSGAB</a>, 
<a class="el" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa4b92970b3bad368ef6b6e73b315a4755">MSGABC</a>, 
<br />
&#160;&#160;<a class="el" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa21043ddfa5289b4cf14cd4e3f5a89b62">QUERY</a>, 
<a class="el" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581faf88e46564f67a88a18b9ba3af5792b02">ME</a>, 
<a class="el" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581faed8762ff982b982ce3d67f81ab34f1d4">NOTICE</a>, 
<a class="el" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa42673ce977a9b34eef83a0611f1a2730">WHOIS</a>, 
<br />
&#160;&#160;<a class="el" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa610966c21da939ce3972c0498c6485bb">WHOWAS</a>, 
<a class="el" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581facb351e08d637347c1132ba8a73f0c812">DNS</a>, 
<a class="el" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa552dbfc018bbff8b37c76efea76ca893">KICK</a>
<br />
 }</td></tr>
<tr class="separator:abfa4cf7a25ca27eb109ef9065f30581f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcc3dd03f6be8a8011d83677b20ea84f"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#adcc3dd03f6be8a8011d83677b20ea84f">LPATHS</a> { <a class="el" href="server_8h.html#adcc3dd03f6be8a8011d83677b20ea84fa43874547248ac14adee50ee06f31e909">ACCESS</a>, 
<a class="el" href="server_8h.html#adcc3dd03f6be8a8011d83677b20ea84fa3dd2c95c6f5060be15bf596d2a012034">ERRORS</a>, 
<a class="el" href="server_8h.html#adcc3dd03f6be8a8011d83677b20ea84faa4c3e403340be8ad2c8b1a70534adb12">NOTICES</a>
 }</td></tr>
<tr class="separator:adcc3dd03f6be8a8011d83677b20ea84f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a1f61d16ccfab82b21ca40ce23feb7c02"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a1f61d16ccfab82b21ca40ce23feb7c02">set_sockfd</a> (<a class="el" href="structt__serv.html">t_serv</a> *all)</td></tr>
<tr class="separator:a1f61d16ccfab82b21ca40ce23feb7c02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5cb15d408ef32c09c2485937503438ed"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a5cb15d408ef32c09c2485937503438ed">set_epoll</a> (<a class="el" href="structt__serv.html">t_serv</a> *all)</td></tr>
<tr class="separator:a5cb15d408ef32c09c2485937503438ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3802a71fa34e93cb1d85f919914f5abf"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a3802a71fa34e93cb1d85f919914f5abf">set_iface</a> (<a class="el" href="server_8h.html#aa62dc6ab378205892df275c6df156dba">adrinf</a> *hints, <a class="el" href="server_8h.html#aa62dc6ab378205892df275c6df156dba">adrinf</a> **res, const char *port)</td></tr>
<tr class="separator:a3802a71fa34e93cb1d85f919914f5abf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9bc3ff8e7f409540f85b3cc97636500"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#aa9bc3ff8e7f409540f85b3cc97636500">set_clifd</a> (int clisock, int epollfd, struct epoll_event *ev)</td></tr>
<tr class="separator:aa9bc3ff8e7f409540f85b3cc97636500"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5949d17278df5e1ada98dca25ccd961"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#ac5949d17278df5e1ada98dca25ccd961">get_methods</a> (char *req, int clifd)</td></tr>
<tr class="separator:ac5949d17278df5e1ada98dca25ccd961"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e2903ce4461ed71cf294dd675bd4c49"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a7e2903ce4461ed71cf294dd675bd4c49">logthisevent</a> (const char etype, <a class="el" href="structt__serv.html">t_serv</a> *all)</td></tr>
<tr class="separator:a7e2903ce4461ed71cf294dd675bd4c49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45c9c768c2486ac046ac242d3c46aadb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a45c9c768c2486ac046ac242d3c46aadb">print_users</a> (<a class="el" href="structt__userlist.html">t_userlist</a> *list)</td></tr>
<tr class="separator:a45c9c768c2486ac046ac242d3c46aadb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a805324e4c542079956ff84a290274d23"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a805324e4c542079956ff84a290274d23">print_users_in_chans</a> (<a class="el" href="structt__channel.html">t_channel</a> *chanlist, int index)</td></tr>
<tr class="separator:a805324e4c542079956ff84a290274d23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1cf3d818bc2607cb0f69c043dba3c039"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structt__userlist.html">t_userlist</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a1cf3d818bc2607cb0f69c043dba3c039">get_new_userlist</a> (<a class="el" href="structt__user.html">t_user</a> *usr)</td></tr>
<tr class="separator:a1cf3d818bc2607cb0f69c043dba3c039"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af00c364b53de2b369d1ba7339975afa0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#af00c364b53de2b369d1ba7339975afa0">free_userlist</a> (<a class="el" href="structt__userlist.html">t_userlist</a> *list)</td></tr>
<tr class="separator:af00c364b53de2b369d1ba7339975afa0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b707a3b8d0f77075ea567c4718c4c06"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a4b707a3b8d0f77075ea567c4718c4c06">remove_user</a> (<a class="el" href="structt__userlist.html">t_userlist</a> *list, int clifd)</td></tr>
<tr class="separator:a4b707a3b8d0f77075ea567c4718c4c06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace045c243817cc0c9885bdf3b41263c0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structt__user.html">t_user</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#ace045c243817cc0c9885bdf3b41263c0">get_new_user</a> (int clifd, <a class="el" href="server_8h.html#acfbe918d8821ff3d1d8dc2c90bb8f6a2">cmdargs</a> usercmd)</td></tr>
<tr class="separator:ace045c243817cc0c9885bdf3b41263c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b16f778b01689e31ef5530b66d41390"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a2b16f778b01689e31ef5530b66d41390">insert_back_user</a> (<a class="el" href="structt__userlist.html">t_userlist</a> *head, <a class="el" href="structt__userlist.html">t_userlist</a> *nuser)</td></tr>
<tr class="separator:a2b16f778b01689e31ef5530b66d41390"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c3fc93845d179d198452e745f3460b1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structt__channel.html">t_channel</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a1c3fc93845d179d198452e745f3460b1">init_default_channel</a> (void)</td></tr>
<tr class="separator:a1c3fc93845d179d198452e745f3460b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9ed9b81c1a3ec9299e894c5986c42e6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#ad9ed9b81c1a3ec9299e894c5986c42e6">free_channel_list</a> (<a class="el" href="structt__channel.html">t_channel</a> *list)</td></tr>
<tr class="separator:ad9ed9b81c1a3ec9299e894c5986c42e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46341819e18479370867b55731a6c6dd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structt__channel.html">t_channel</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a46341819e18479370867b55731a6c6dd">get_new_chan_list</a> (<a class="el" href="structt__userlist.html">t_userlist</a> *userlist, char *)</td></tr>
<tr class="separator:a46341819e18479370867b55731a6c6dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade7cba4847a297abf811114846d62cac"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#ade7cba4847a297abf811114846d62cac">remove_channel</a> (<a class="el" href="structt__channel.html">t_channel</a> *list, char *channame)</td></tr>
<tr class="separator:ade7cba4847a297abf811114846d62cac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f3f52d09747a128a3107f465a4f3421"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a0f3f52d09747a128a3107f465a4f3421">insert_back_channel</a> (<a class="el" href="structt__channel.html">t_channel</a> *head, <a class="el" href="structt__channel.html">t_channel</a> *chan)</td></tr>
<tr class="separator:a0f3f52d09747a128a3107f465a4f3421"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0195cd48a4c52a9624a811825cef8afb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structt__user.html">t_user</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a0195cd48a4c52a9624a811825cef8afb">find_user_by_fd</a> (<a class="el" href="structt__userlist.html">t_userlist</a> *list, int clifd)</td></tr>
<tr class="separator:a0195cd48a4c52a9624a811825cef8afb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae86be37e5d76544c9d6feb9d7b9b6b02"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structt__channel.html">t_channel</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#ae86be37e5d76544c9d6feb9d7b9b6b02">get_chan_by_name</a> (<a class="el" href="structt__channel.html">t_channel</a> *list, char *channame)</td></tr>
<tr class="separator:ae86be37e5d76544c9d6feb9d7b9b6b02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af9f57eda934151d707615e8f315e7897"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#af9f57eda934151d707615e8f315e7897">is_user_in_chan</a> (int clifd, <a class="el" href="structt__channel.html">t_channel</a> *chans)</td></tr>
<tr class="separator:af9f57eda934151d707615e8f315e7897"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ebf668b9cfc31f3b29114dfed75c0ad"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structt__user.html">t_user</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a7ebf668b9cfc31f3b29114dfed75c0ad">find_user_by_name</a> (const char *name, <a class="el" href="structt__userlist.html">t_userlist</a> *usrs)</td></tr>
<tr class="separator:a7ebf668b9cfc31f3b29114dfed75c0ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c9b2cd4523b5cc43326163d534225d9"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a5c9b2cd4523b5cc43326163d534225d9">get_size</a> (<a class="el" href="server_8h.html#acfbe918d8821ff3d1d8dc2c90bb8f6a2">cmdargs</a> args)</td></tr>
<tr class="separator:a5c9b2cd4523b5cc43326163d534225d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7bc519f56f91233055c4bee31d1c33bb"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a7bc519f56f91233055c4bee31d1c33bb">join</a> (<a class="el" href="server_8h.html#acfbe918d8821ff3d1d8dc2c90bb8f6a2">cmdargs</a> args, int clifd, <a class="el" href="structt__channel.html">t_channel</a> *chanlist)</td></tr>
<tr class="separator:a7bc519f56f91233055c4bee31d1c33bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8193bc1dd3461f512b07b2a8c686ec9c"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a8193bc1dd3461f512b07b2a8c686ec9c">nick</a> (<a class="el" href="server_8h.html#acfbe918d8821ff3d1d8dc2c90bb8f6a2">cmdargs</a> args, int clifd, <a class="el" href="structt__channel.html">t_channel</a> *chanlist)</td></tr>
<tr class="separator:a8193bc1dd3461f512b07b2a8c686ec9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2f830dde1e4ea8ef5e013a15cff72be"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#ad2f830dde1e4ea8ef5e013a15cff72be">ping</a> (<a class="el" href="server_8h.html#acfbe918d8821ff3d1d8dc2c90bb8f6a2">cmdargs</a> args, int clifd, <a class="el" href="structt__channel.html">t_channel</a> *chanlist)</td></tr>
<tr class="separator:ad2f830dde1e4ea8ef5e013a15cff72be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac36f6273cc3b6d793ac67fd4ab88fbc4"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#ac36f6273cc3b6d793ac67fd4ab88fbc4">user</a> (<a class="el" href="server_8h.html#acfbe918d8821ff3d1d8dc2c90bb8f6a2">cmdargs</a> args, int clifd, <a class="el" href="structt__channel.html">t_channel</a> *chanlist)</td></tr>
<tr class="separator:ac36f6273cc3b6d793ac67fd4ab88fbc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a966c4254db49b02978407670cc9fa9"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a8a966c4254db49b02978407670cc9fa9">quit</a> (<a class="el" href="server_8h.html#acfbe918d8821ff3d1d8dc2c90bb8f6a2">cmdargs</a> args, int clifd, <a class="el" href="structt__channel.html">t_channel</a> *chanlist)</td></tr>
<tr class="separator:a8a966c4254db49b02978407670cc9fa9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5da766def7467ba7a3899fddbfcd278"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#aa5da766def7467ba7a3899fddbfcd278">privmsg</a> (<a class="el" href="server_8h.html#acfbe918d8821ff3d1d8dc2c90bb8f6a2">cmdargs</a> args, int clifd, <a class="el" href="structt__channel.html">t_channel</a> *chans)</td></tr>
<tr class="separator:aa5da766def7467ba7a3899fddbfcd278"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f31a6fd48ee5d4579ae4aaaa3cae285"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a4f31a6fd48ee5d4579ae4aaaa3cae285">sig_handler</a> (int signo)</td></tr>
<tr class="separator:a4f31a6fd48ee5d4579ae4aaaa3cae285"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ae19e01ff7678899828036520edec313c"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#ae19e01ff7678899828036520edec313c">G_PROTOS</a> [<a class="el" href="server_8h.html#a9880cfe1f4eb3140da2095fd081282f5">REF_NB</a>]</td></tr>
<tr class="separator:ae19e01ff7678899828036520edec313c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7bb29231b69e3767e187ffe5d5717b28"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="server_8h.html#abc9c1e6f561b7500f7ecb3813d272d20">cmds</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8h.html#a7bb29231b69e3767e187ffe5d5717b28">G_CMDS</a> [<a class="el" href="server_8h.html#a9880cfe1f4eb3140da2095fd081282f5">REF_NB</a>]</td></tr>
<tr class="separator:a7bb29231b69e3767e187ffe5d5717b28"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="aeefbbafa97642defe3ee6c3080b7d66f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeefbbafa97642defe3ee6c3080b7d66f">&#9670;&nbsp;</a></span>BACKLOG</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BACKLOG&#160;&#160;&#160;5</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Number of simultaneous connection on server listening socket see listen() call </p>

<p class="definition">Definition at line <a class="el" href="server_8h_source.html#l00020">20</a> of file <a class="el" href="server_8h_source.html">server.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="server__init_8c_source.html#l00100">set_sockfd()</a>.</p>

</div>
</div>
<a id="a6821bafc3c88dfb2e433a095df9940c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6821bafc3c88dfb2e433a095df9940c6">&#9670;&nbsp;</a></span>BUF_SIZE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BUF_SIZE&#160;&#160;&#160;1060</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This good old C mem alloc dirty method </p>

<p class="definition">Definition at line <a class="el" href="server_8h_source.html#l00024">24</a> of file <a class="el" href="server_8h_source.html">server.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="rfc__cmds1_8c_source.html#l00018">get_full_msg()</a>, and <a class="el" href="server__main_8c_source.html#l00074">getactiveclients()</a>.</p>

</div>
</div>
<a id="a2b912ed39df233b43d7a093814705afb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b912ed39df233b43d7a093814705afb">&#9670;&nbsp;</a></span>EVER</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define EVER&#160;&#160;&#160;;;</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Yess useless so mandatory </p>

<p class="definition">Definition at line <a class="el" href="server_8h_source.html#l00046">46</a> of file <a class="el" href="server_8h_source.html">server.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="server__main_8c_source.html#l00096">server()</a>.</p>

</div>
</div>
<a id="a65e9886d74aaee76545e83dd09011727"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a65e9886d74aaee76545e83dd09011727">&#9670;&nbsp;</a></span>false</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define false&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="server_8h_source.html#l00103">103</a> of file <a class="el" href="server_8h_source.html">server.h</a>.</p>

</div>
</div>
<a id="ae42954bb8545d24e3e9dcde5920c9a0b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae42954bb8545d24e3e9dcde5920c9a0b">&#9670;&nbsp;</a></span>MAX_EVENTS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAX_EVENTS&#160;&#160;&#160;10</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The length of the struct epoll_events array pointed to by *events </p>

<p class="definition">Definition at line <a class="el" href="server_8h_source.html#l00027">27</a> of file <a class="el" href="server_8h_source.html">server.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="server__main_8c_source.html#l00096">server()</a>.</p>

</div>
</div>
<a id="a41101847771d39a4f0a7f9395061c629"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a41101847771d39a4f0a7f9395061c629">&#9670;&nbsp;</a></span>MAXARGS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAXARGS&#160;&#160;&#160;15</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Maximum number of args in command as per rfc request see section 2.3 of RFC 2812 </p>

<p class="definition">Definition at line <a class="el" href="server_8h_source.html#l00035">35</a> of file <a class="el" href="server_8h_source.html">server.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="commands__parsing_8c_source.html#l00049">get_args()</a>, and <a class="el" href="commands__parsing_8c_source.html#l00028">get_commands()</a>.</p>

</div>
</div>
<a id="ab0122c358494825a5050009adfff9fc0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0122c358494825a5050009adfff9fc0">&#9670;&nbsp;</a></span>MAXARGSIZE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAXARGSIZE&#160;&#160;&#160;33</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Maximum argument length see ref below </p><dl class="section note"><dt>Note</dt><dd>obtained by 500 / max args </dd></dl>

<p class="definition">Definition at line <a class="el" href="server_8h_source.html#l00039">39</a> of file <a class="el" href="server_8h_source.html">server.h</a>.</p>

</div>
</div>
<a id="a2b38553235fff093729b446c1e46231c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b38553235fff093729b446c1e46231c">&#9670;&nbsp;</a></span>MAXCHAN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAXCHAN&#160;&#160;&#160;1000</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This good old ... u know </p>

<p class="definition">Definition at line <a class="el" href="server_8h_source.html#l00029">29</a> of file <a class="el" href="server_8h_source.html">server.h</a>.</p>

</div>
</div>
<a id="adeb606407e063430174e4903a0d80c2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adeb606407e063430174e4903a0d80c2b">&#9670;&nbsp;</a></span>MAXCHANNAME</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAXCHANNAME&#160;&#160;&#160;50</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Idem, see <a class="el" href="server_8h.html#a7bc519f56f91233055c4bee31d1c33bb">join()</a> function and RFC 1459 and RFC 2812 </p>

<p class="definition">Definition at line <a class="el" href="server_8h_source.html#l00031">31</a> of file <a class="el" href="server_8h_source.html">server.h</a>.</p>

</div>
</div>
<a id="a9880cfe1f4eb3140da2095fd081282f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9880cfe1f4eb3140da2095fd081282f5">&#9670;&nbsp;</a></span>REF_NB</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define REF_NB&#160;&#160;&#160;15</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Number of RFC command handled by this (broken) server </p>

<p class="definition">Definition at line <a class="el" href="server_8h_source.html#l00022">22</a> of file <a class="el" href="server_8h_source.html">server.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="commands__parsing_8c_source.html#l00073">get_methods()</a>.</p>

</div>
</div>
<a id="a41f9c5fb8b08eb5dc3edce4dcb37fee7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a41f9c5fb8b08eb5dc3edce4dcb37fee7">&#9670;&nbsp;</a></span>true</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define true&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>To avoid stdbool include (for s_user.isco) </p>

<p class="definition">Definition at line <a class="el" href="server_8h_source.html#l00102">102</a> of file <a class="el" href="server_8h_source.html">server.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="aa62dc6ab378205892df275c6df156dba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa62dc6ab378205892df275c6df156dba">&#9670;&nbsp;</a></span>adrinf</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct addrinfo <a class="el" href="server_8h.html#aa62dc6ab378205892df275c6df156dba">adrinf</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Yeah simplification </p>

<p class="definition">Definition at line <a class="el" href="server_8h_source.html#l00082">82</a> of file <a class="el" href="server_8h_source.html">server.h</a>.</p>

</div>
</div>
<a id="acfbe918d8821ff3d1d8dc2c90bb8f6a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acfbe918d8821ff3d1d8dc2c90bb8f6a2">&#9670;&nbsp;</a></span>cmdargs</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef char** <a class="el" href="server_8h.html#acfbe918d8821ff3d1d8dc2c90bb8f6a2">cmdargs</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Argument format typedef as per RFC request </p><dl class="section note"><dt>Note</dt><dd>Useless typedef came from a deprecated method, but hey too lazy to rename all </dd></dl>

<p class="definition">Definition at line <a class="el" href="server_8h_source.html#l00044">44</a> of file <a class="el" href="server_8h_source.html">server.h</a>.</p>

</div>
</div>
<a id="abc9c1e6f561b7500f7ecb3813d272d20"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abc9c1e6f561b7500f7ecb3813d272d20">&#9670;&nbsp;</a></span>cmds</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void*(* cmds) (<a class="el" href="server_8h.html#acfbe918d8821ff3d1d8dc2c90bb8f6a2">cmdargs</a> args, int clifd, <a class="el" href="structt__channel.html">t_channel</a> *chanlist)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Main EPITECH MyIRC Protocol (RFC 1459 Extract) methods function pointer </p>

<p class="definition">Definition at line <a class="el" href="server_8h_source.html#l00175">175</a> of file <a class="el" href="server_8h_source.html">server.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="abfa4cf7a25ca27eb109ef9065f30581f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abfa4cf7a25ca27eb109ef9065f30581f">&#9670;&nbsp;</a></span>CMDS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581f">CMDS</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Only here for code clarity and lisibility  : still missing lot of rfc command see subject, rfc or this <a href="https://gist.github.com/xero/2d6e4b061b4ecbeb9f99">gist</a> for help </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="abfa4cf7a25ca27eb109ef9065f30581fa4925a399dab94b9b58f6d1b5cd246af7"></a>JOIN&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="abfa4cf7a25ca27eb109ef9065f30581fa3e724a44d5e55b043a1c6ba83aa08bea"></a>NICK&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="abfa4cf7a25ca27eb109ef9065f30581fa3a95ef902bc659901cceef98e0bc8041"></a>PING&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="abfa4cf7a25ca27eb109ef9065f30581fae2d30a195cee6b2961cc2c23ea4b520b"></a>USER&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="abfa4cf7a25ca27eb109ef9065f30581fa76bdc8adfd6c6463ab269ff4c06be9b4"></a>QUIT&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="abfa4cf7a25ca27eb109ef9065f30581fa67c96b24b23bcb408bae7626730a04b7"></a>SERVER&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="abfa4cf7a25ca27eb109ef9065f30581fa173f98c603042f6241b70157d56e385f"></a>PART&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="abfa4cf7a25ca27eb109ef9065f30581fa2009451f58075e636458d7149da4488a"></a>USERS&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="abfa4cf7a25ca27eb109ef9065f30581faa96582524abaa2ba9ee6ba926dee5262"></a>NAMES&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="abfa4cf7a25ca27eb109ef9065f30581fa5946189c2ff16a177f8d6266b96ea30e"></a>ACCEPTF&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="abfa4cf7a25ca27eb109ef9065f30581fa7bdf7243edf3c972e0fbc08bd0d4079d"></a>MSGAB&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="abfa4cf7a25ca27eb109ef9065f30581fa4b92970b3bad368ef6b6e73b315a4755"></a>MSGABC&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="abfa4cf7a25ca27eb109ef9065f30581fa21043ddfa5289b4cf14cd4e3f5a89b62"></a>QUERY&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="abfa4cf7a25ca27eb109ef9065f30581faf88e46564f67a88a18b9ba3af5792b02"></a>ME&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="abfa4cf7a25ca27eb109ef9065f30581faed8762ff982b982ce3d67f81ab34f1d4"></a>NOTICE&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="abfa4cf7a25ca27eb109ef9065f30581fa42673ce977a9b34eef83a0611f1a2730"></a>WHOIS&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="abfa4cf7a25ca27eb109ef9065f30581fa610966c21da939ce3972c0498c6485bb"></a>WHOWAS&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="abfa4cf7a25ca27eb109ef9065f30581facb351e08d637347c1132ba8a73f0c812"></a>DNS&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="abfa4cf7a25ca27eb109ef9065f30581fa552dbfc018bbff8b37c76efea76ca893"></a>KICK&#160;</td><td class="fielddoc"></td></tr>
</table>

<p class="definition">Definition at line <a class="el" href="server_8h_source.html#l00053">53</a> of file <a class="el" href="server_8h_source.html">server.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;                   {</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;                <a class="code" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa4925a399dab94b9b58f6d1b5cd246af7">JOIN</a>, <a class="code" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa3e724a44d5e55b043a1c6ba83aa08bea">NICK</a>, <a class="code" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa3a95ef902bc659901cceef98e0bc8041">PING</a>, <a class="code" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fae2d30a195cee6b2961cc2c23ea4b520b">USER</a>, <a class="code" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa76bdc8adfd6c6463ab269ff4c06be9b4">QUIT</a>, <a class="code" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa67c96b24b23bcb408bae7626730a04b7">SERVER</a>, <a class="code" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa173f98c603042f6241b70157d56e385f">PART</a>,</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;                <a class="code" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa2009451f58075e636458d7149da4488a">USERS</a>, <a class="code" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581faa96582524abaa2ba9ee6ba926dee5262">NAMES</a>, <a class="code" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa5946189c2ff16a177f8d6266b96ea30e">ACCEPTF</a>, <a class="code" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa7bdf7243edf3c972e0fbc08bd0d4079d">MSGAB</a>, <a class="code" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa4b92970b3bad368ef6b6e73b315a4755">MSGABC</a>,</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;                <a class="code" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa21043ddfa5289b4cf14cd4e3f5a89b62">QUERY</a>, <a class="code" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581faf88e46564f67a88a18b9ba3af5792b02">ME</a>, <a class="code" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581faed8762ff982b982ce3d67f81ab34f1d4">NOTICE</a>, <a class="code" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa42673ce977a9b34eef83a0611f1a2730">WHOIS</a>, <a class="code" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa610966c21da939ce3972c0498c6485bb">WHOWAS</a>,</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;                <a class="code" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581facb351e08d637347c1132ba8a73f0c812">DNS</a>, <a class="code" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa552dbfc018bbff8b37c76efea76ca893">KICK</a></div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        };</div><div class="ttc" id="server_8h_html_abfa4cf7a25ca27eb109ef9065f30581fa76bdc8adfd6c6463ab269ff4c06be9b4"><div class="ttname"><a href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa76bdc8adfd6c6463ab269ff4c06be9b4">QUIT</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00054">server.h:54</a></div></div>
<div class="ttc" id="server_8h_html_abfa4cf7a25ca27eb109ef9065f30581faa96582524abaa2ba9ee6ba926dee5262"><div class="ttname"><a href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581faa96582524abaa2ba9ee6ba926dee5262">NAMES</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00055">server.h:55</a></div></div>
<div class="ttc" id="server_8h_html_abfa4cf7a25ca27eb109ef9065f30581faed8762ff982b982ce3d67f81ab34f1d4"><div class="ttname"><a href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581faed8762ff982b982ce3d67f81ab34f1d4">NOTICE</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00056">server.h:56</a></div></div>
<div class="ttc" id="server_8h_html_abfa4cf7a25ca27eb109ef9065f30581fa21043ddfa5289b4cf14cd4e3f5a89b62"><div class="ttname"><a href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa21043ddfa5289b4cf14cd4e3f5a89b62">QUERY</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00056">server.h:56</a></div></div>
<div class="ttc" id="server_8h_html_abfa4cf7a25ca27eb109ef9065f30581fa552dbfc018bbff8b37c76efea76ca893"><div class="ttname"><a href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa552dbfc018bbff8b37c76efea76ca893">KICK</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00057">server.h:57</a></div></div>
<div class="ttc" id="server_8h_html_abfa4cf7a25ca27eb109ef9065f30581fa7bdf7243edf3c972e0fbc08bd0d4079d"><div class="ttname"><a href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa7bdf7243edf3c972e0fbc08bd0d4079d">MSGAB</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00055">server.h:55</a></div></div>
<div class="ttc" id="server_8h_html_abfa4cf7a25ca27eb109ef9065f30581faf88e46564f67a88a18b9ba3af5792b02"><div class="ttname"><a href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581faf88e46564f67a88a18b9ba3af5792b02">ME</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00056">server.h:56</a></div></div>
<div class="ttc" id="server_8h_html_abfa4cf7a25ca27eb109ef9065f30581fa173f98c603042f6241b70157d56e385f"><div class="ttname"><a href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa173f98c603042f6241b70157d56e385f">PART</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00054">server.h:54</a></div></div>
<div class="ttc" id="server_8h_html_abfa4cf7a25ca27eb109ef9065f30581fa4b92970b3bad368ef6b6e73b315a4755"><div class="ttname"><a href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa4b92970b3bad368ef6b6e73b315a4755">MSGABC</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00055">server.h:55</a></div></div>
<div class="ttc" id="server_8h_html_abfa4cf7a25ca27eb109ef9065f30581fa2009451f58075e636458d7149da4488a"><div class="ttname"><a href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa2009451f58075e636458d7149da4488a">USERS</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00055">server.h:55</a></div></div>
<div class="ttc" id="server_8h_html_abfa4cf7a25ca27eb109ef9065f30581fa3a95ef902bc659901cceef98e0bc8041"><div class="ttname"><a href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa3a95ef902bc659901cceef98e0bc8041">PING</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00054">server.h:54</a></div></div>
<div class="ttc" id="server_8h_html_abfa4cf7a25ca27eb109ef9065f30581fa5946189c2ff16a177f8d6266b96ea30e"><div class="ttname"><a href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa5946189c2ff16a177f8d6266b96ea30e">ACCEPTF</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00055">server.h:55</a></div></div>
<div class="ttc" id="server_8h_html_abfa4cf7a25ca27eb109ef9065f30581fae2d30a195cee6b2961cc2c23ea4b520b"><div class="ttname"><a href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fae2d30a195cee6b2961cc2c23ea4b520b">USER</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00054">server.h:54</a></div></div>
<div class="ttc" id="server_8h_html_abfa4cf7a25ca27eb109ef9065f30581fa3e724a44d5e55b043a1c6ba83aa08bea"><div class="ttname"><a href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa3e724a44d5e55b043a1c6ba83aa08bea">NICK</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00054">server.h:54</a></div></div>
<div class="ttc" id="server_8h_html_abfa4cf7a25ca27eb109ef9065f30581facb351e08d637347c1132ba8a73f0c812"><div class="ttname"><a href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581facb351e08d637347c1132ba8a73f0c812">DNS</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00057">server.h:57</a></div></div>
<div class="ttc" id="server_8h_html_abfa4cf7a25ca27eb109ef9065f30581fa67c96b24b23bcb408bae7626730a04b7"><div class="ttname"><a href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa67c96b24b23bcb408bae7626730a04b7">SERVER</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00054">server.h:54</a></div></div>
<div class="ttc" id="server_8h_html_abfa4cf7a25ca27eb109ef9065f30581fa610966c21da939ce3972c0498c6485bb"><div class="ttname"><a href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa610966c21da939ce3972c0498c6485bb">WHOWAS</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00056">server.h:56</a></div></div>
<div class="ttc" id="server_8h_html_abfa4cf7a25ca27eb109ef9065f30581fa42673ce977a9b34eef83a0611f1a2730"><div class="ttname"><a href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa42673ce977a9b34eef83a0611f1a2730">WHOIS</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00056">server.h:56</a></div></div>
<div class="ttc" id="server_8h_html_abfa4cf7a25ca27eb109ef9065f30581fa4925a399dab94b9b58f6d1b5cd246af7"><div class="ttname"><a href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa4925a399dab94b9b58f6d1b5cd246af7">JOIN</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00054">server.h:54</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="adcc3dd03f6be8a8011d83677b20ea84f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adcc3dd03f6be8a8011d83677b20ea84f">&#9670;&nbsp;</a></span>LPATHS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="server_8h.html#adcc3dd03f6be8a8011d83677b20ea84f">LPATHS</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="adcc3dd03f6be8a8011d83677b20ea84fa43874547248ac14adee50ee06f31e909"></a>ACCESS&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="adcc3dd03f6be8a8011d83677b20ea84fa3dd2c95c6f5060be15bf596d2a012034"></a>ERRORS&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="adcc3dd03f6be8a8011d83677b20ea84faa4c3e403340be8ad2c8b1a70534adb12"></a>NOTICES&#160;</td><td class="fielddoc"></td></tr>
</table>

<p class="definition">Definition at line <a class="el" href="server_8h_source.html#l00061">61</a> of file <a class="el" href="server_8h_source.html">server.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;                     {</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;                <a class="code" href="server_8h.html#adcc3dd03f6be8a8011d83677b20ea84fa43874547248ac14adee50ee06f31e909">ACCESS</a>,</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;                <a class="code" href="server_8h.html#adcc3dd03f6be8a8011d83677b20ea84fa3dd2c95c6f5060be15bf596d2a012034">ERRORS</a>,</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;                <a class="code" href="server_8h.html#adcc3dd03f6be8a8011d83677b20ea84faa4c3e403340be8ad2c8b1a70534adb12">NOTICES</a></div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        };</div><div class="ttc" id="server_8h_html_adcc3dd03f6be8a8011d83677b20ea84faa4c3e403340be8ad2c8b1a70534adb12"><div class="ttname"><a href="server_8h.html#adcc3dd03f6be8a8011d83677b20ea84faa4c3e403340be8ad2c8b1a70534adb12">NOTICES</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00064">server.h:64</a></div></div>
<div class="ttc" id="server_8h_html_adcc3dd03f6be8a8011d83677b20ea84fa3dd2c95c6f5060be15bf596d2a012034"><div class="ttname"><a href="server_8h.html#adcc3dd03f6be8a8011d83677b20ea84fa3dd2c95c6f5060be15bf596d2a012034">ERRORS</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00063">server.h:63</a></div></div>
<div class="ttc" id="server_8h_html_adcc3dd03f6be8a8011d83677b20ea84fa43874547248ac14adee50ee06f31e909"><div class="ttname"><a href="server_8h.html#adcc3dd03f6be8a8011d83677b20ea84fa43874547248ac14adee50ee06f31e909">ACCESS</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00062">server.h:62</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a0195cd48a4c52a9624a811825cef8afb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0195cd48a4c52a9624a811825cef8afb">&#9670;&nbsp;</a></span>find_user_by_fd()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structt__user.html">t_user</a>* find_user_by_fd </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structt__userlist.html">t_userlist</a> *&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>clifd</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>See server_src/list_helpers.c</p>
<p>Find a <a class="el" href="structt__user.html">t_user</a> structure pointer if clientfd exist inside </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>the full userlist </td></tr>
    <tr><td class="paramname">clifd</td><td>the 'to find' client fd </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>user if clientfd exist in the list </dd>
<dd>
NULL pointer if nothing found </dd></dl>

<p class="definition">Definition at line <a class="el" href="lists__helpers_8c_source.html#l00026">26</a> of file <a class="el" href="lists__helpers_8c_source.html">lists_helpers.c</a>.</p>

<p class="reference">References <a class="el" href="server_8h_source.html#l00117">t_userlist::next</a>.</p>

<p class="reference">Referenced by <a class="el" href="rfc__cmds0_8c_source.html#l00019">join()</a>, <a class="el" href="rfc__cmds1_8c_source.html#l00054">privmsg()</a>, and <a class="el" href="rfc__cmds0_8c_source.html#l00101">quit()</a>.</p>
<div class="fragment"><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;{</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;        <a class="code" href="structt__user.html">t_user</a> *usr = NULL;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;        <span class="keywordflow">for</span> (<a class="code" href="structt__userlist.html">t_userlist</a> *tmp = list; tmp; tmp = tmp-&gt;<a class="code" href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">next</a>) {</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;                <span class="keywordflow">if</span> (tmp-&gt;user-&gt;clifd == clifd) {</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;                        usr = tmp-&gt;user;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;                        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;                }</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;        }</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <span class="keywordflow">return</span> (usr);</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;}</div><div class="ttc" id="structt__userlist_html"><div class="ttname"><a href="structt__userlist.html">t_userlist</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00114">server.h:114</a></div></div>
<div class="ttc" id="structt__user_html"><div class="ttname"><a href="structt__user.html">t_user</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00105">server.h:105</a></div></div>
<div class="ttc" id="structt__userlist_html_a3b987a9a352379a703da737198b42d4a"><div class="ttname"><a href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">t_userlist::next</a></div><div class="ttdeci">struct s_userlist * next</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00117">server.h:117</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_a0195cd48a4c52a9624a811825cef8afb_icgraph.png" border="0" usemap="#server_8h_a0195cd48a4c52a9624a811825cef8afb_icgraph" alt=""/></div>
<map name="server_8h_a0195cd48a4c52a9624a811825cef8afb_icgraph" id="server_8h_a0195cd48a4c52a9624a811825cef8afb_icgraph">
<area shape="rect" id="node2" href="server_8h.html#a7bc519f56f91233055c4bee31d1c33bb" title="join" alt="" coords="181,5,223,32"/>
<area shape="rect" id="node3" href="server_8h.html#aa5da766def7467ba7a3899fddbfcd278" title="privmsg" alt="" coords="168,56,236,83"/>
<area shape="rect" id="node4" href="server_8h.html#a8a966c4254db49b02978407670cc9fa9" title="quit" alt="" coords="181,107,223,133"/>
</map>
</div>

</div>
</div>
<a id="a7ebf668b9cfc31f3b29114dfed75c0ad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7ebf668b9cfc31f3b29114dfed75c0ad">&#9670;&nbsp;</a></span>find_user_by_name()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structt__user.html">t_user</a>* find_user_by_name </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structt__userlist.html">t_userlist</a> *&#160;</td>
          <td class="paramname"><em>usrs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Find a user by name literaly </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>the name to find </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="lists__helpers_8c_source.html#l00072">72</a> of file <a class="el" href="lists__helpers_8c_source.html">lists_helpers.c</a>.</p>

<p class="reference">References <a class="el" href="server_8h_source.html#l00117">t_userlist::next</a>.</p>

<p class="reference">Referenced by <a class="el" href="rfc__cmds1_8c_source.html#l00054">privmsg()</a>.</p>
<div class="fragment"><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;{</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        <a class="code" href="structt__user.html">t_user</a> *needle = NULL;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;        <span class="keywordflow">for</span> (<a class="code" href="structt__userlist.html">t_userlist</a> *foo = usrs; foo; foo = foo-&gt;<a class="code" href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">next</a>) {</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;                <span class="keywordflow">if</span> (!strcmp(name, foo-&gt;user-&gt;nick) ||</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;                !strcmp(name, foo-&gt;user-&gt;rname)) {</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;                        needle = foo-&gt;user;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;                        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;                }</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        }</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        <span class="keywordflow">return</span> (needle);</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;}</div><div class="ttc" id="structt__userlist_html"><div class="ttname"><a href="structt__userlist.html">t_userlist</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00114">server.h:114</a></div></div>
<div class="ttc" id="structt__user_html"><div class="ttname"><a href="structt__user.html">t_user</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00105">server.h:105</a></div></div>
<div class="ttc" id="structt__userlist_html_a3b987a9a352379a703da737198b42d4a"><div class="ttname"><a href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">t_userlist::next</a></div><div class="ttdeci">struct s_userlist * next</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00117">server.h:117</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_a7ebf668b9cfc31f3b29114dfed75c0ad_icgraph.png" border="0" usemap="#server_8h_a7ebf668b9cfc31f3b29114dfed75c0ad_icgraph" alt=""/></div>
<map name="server_8h_a7ebf668b9cfc31f3b29114dfed75c0ad_icgraph" id="server_8h_a7ebf668b9cfc31f3b29114dfed75c0ad_icgraph">
<area shape="rect" id="node2" href="server_8h.html#aa5da766def7467ba7a3899fddbfcd278" title="privmsg" alt="" coords="188,5,256,32"/>
</map>
</div>

</div>
</div>
<a id="ad9ed9b81c1a3ec9299e894c5986c42e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad9ed9b81c1a3ec9299e894c5986c42e6">&#9670;&nbsp;</a></span>free_channel_list()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void free_channel_list </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structt__channel.html">t_channel</a> *&#160;</td>
          <td class="paramname"><em>list</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Self explanatory </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>the list to be de-allocated </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="channel__list_8c_source.html#l00074">74</a> of file <a class="el" href="channel__list_8c_source.html">channel_list.c</a>.</p>

<p class="reference">References <a class="el" href="user__list_8c_source.html#l00098">free_userlist()</a>, <a class="el" href="server_8h_source.html#l00125">t_channel::next</a>, and <a class="el" href="server_8h_source.html#l00123">t_channel::users</a>.</p>
<div class="fragment"><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;{</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;        <span class="keywordflow">while</span> (list) {</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;                <a class="code" href="user__list_8c.html#af00c364b53de2b369d1ba7339975afa0">free_userlist</a>(list-&gt;<a class="code" href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">users</a>);</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;                <a class="code" href="structt__channel.html">t_channel</a> *next = list-&gt;<a class="code" href="structt__channel.html#ad735fa416150cd0bbd1ce42e82a1c1fa">next</a>;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;                free(list);</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;                list = next;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        }</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;}</div><div class="ttc" id="structt__channel_html_a8097607fae5d78c98125bac6caaefe18"><div class="ttname"><a href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">t_channel::users</a></div><div class="ttdeci">t_userlist * users</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00123">server.h:123</a></div></div>
<div class="ttc" id="structt__channel_html_ad735fa416150cd0bbd1ce42e82a1c1fa"><div class="ttname"><a href="structt__channel.html#ad735fa416150cd0bbd1ce42e82a1c1fa">t_channel::next</a></div><div class="ttdeci">struct s_channel * next</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00125">server.h:125</a></div></div>
<div class="ttc" id="structt__channel_html"><div class="ttname"><a href="structt__channel.html">t_channel</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00121">server.h:121</a></div></div>
<div class="ttc" id="user__list_8c_html_af00c364b53de2b369d1ba7339975afa0"><div class="ttname"><a href="user__list_8c.html#af00c364b53de2b369d1ba7339975afa0">free_userlist</a></div><div class="ttdeci">void free_userlist(t_userlist *list)</div><div class="ttdef"><b>Definition:</b> <a href="user__list_8c_source.html#l00098">user_list.c:98</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_ad9ed9b81c1a3ec9299e894c5986c42e6_cgraph.png" border="0" usemap="#server_8h_ad9ed9b81c1a3ec9299e894c5986c42e6_cgraph" alt=""/></div>
<map name="server_8h_ad9ed9b81c1a3ec9299e894c5986c42e6_cgraph" id="server_8h_ad9ed9b81c1a3ec9299e894c5986c42e6_cgraph">
<area shape="rect" id="node2" href="user__list_8c.html#af00c364b53de2b369d1ba7339975afa0" title="free_userlist" alt="" coords="173,5,267,32"/>
</map>
</div>

</div>
</div>
<a id="af00c364b53de2b369d1ba7339975afa0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af00c364b53de2b369d1ba7339975afa0">&#9670;&nbsp;</a></span>free_userlist()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void free_userlist </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structt__userlist.html">t_userlist</a> *&#160;</td>
          <td class="paramname"><em>list</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Self explanatory </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>the list to be freed </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="user__list_8c_source.html#l00098">98</a> of file <a class="el" href="user__list_8c_source.html">user_list.c</a>.</p>

<p class="reference">References <a class="el" href="server_8h_source.html#l00117">t_userlist::next</a>, <a class="el" href="server_8h_source.html#l00108">t_user::nick</a>, <a class="el" href="server_8h_source.html#l00109">t_user::rname</a>, and <a class="el" href="server_8h_source.html#l00115">t_userlist::user</a>.</p>

<p class="reference">Referenced by <a class="el" href="channel__list_8c_source.html#l00074">free_channel_list()</a>, and <a class="el" href="channel__list_8c_source.html#l00053">remove_channel()</a>.</p>
<div class="fragment"><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;{</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;        <span class="keywordflow">while</span> (list) {</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;                free(list-&gt;<a class="code" href="structt__userlist.html#a946f5b9e4c5110372550989a019ce21b">user</a>-&gt;<a class="code" href="structt__user.html#ab3e2136d7c7ee26a1403bb5fc7f48d8e">rname</a>);</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;                free(list-&gt;<a class="code" href="structt__userlist.html#a946f5b9e4c5110372550989a019ce21b">user</a>-&gt;<a class="code" href="structt__user.html#ae26ce5e41546b895d8d85f3cde41c096">nick</a>);</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;                free(list-&gt;<a class="code" href="structt__userlist.html#a946f5b9e4c5110372550989a019ce21b">user</a>);</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;                <a class="code" href="structt__userlist.html">t_userlist</a> *next = list-&gt;<a class="code" href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">next</a>;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;                free(list);</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;                list = next;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        }</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;}</div><div class="ttc" id="structt__userlist_html"><div class="ttname"><a href="structt__userlist.html">t_userlist</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00114">server.h:114</a></div></div>
<div class="ttc" id="structt__user_html_ab3e2136d7c7ee26a1403bb5fc7f48d8e"><div class="ttname"><a href="structt__user.html#ab3e2136d7c7ee26a1403bb5fc7f48d8e">t_user::rname</a></div><div class="ttdeci">char * rname</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00109">server.h:109</a></div></div>
<div class="ttc" id="structt__userlist_html_a946f5b9e4c5110372550989a019ce21b"><div class="ttname"><a href="structt__userlist.html#a946f5b9e4c5110372550989a019ce21b">t_userlist::user</a></div><div class="ttdeci">t_user * user</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00115">server.h:115</a></div></div>
<div class="ttc" id="structt__userlist_html_a3b987a9a352379a703da737198b42d4a"><div class="ttname"><a href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">t_userlist::next</a></div><div class="ttdeci">struct s_userlist * next</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00117">server.h:117</a></div></div>
<div class="ttc" id="structt__user_html_ae26ce5e41546b895d8d85f3cde41c096"><div class="ttname"><a href="structt__user.html#ae26ce5e41546b895d8d85f3cde41c096">t_user::nick</a></div><div class="ttdeci">char * nick</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00108">server.h:108</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_af00c364b53de2b369d1ba7339975afa0_icgraph.png" border="0" usemap="#server_8h_af00c364b53de2b369d1ba7339975afa0_icgraph" alt=""/></div>
<map name="server_8h_af00c364b53de2b369d1ba7339975afa0_icgraph" id="server_8h_af00c364b53de2b369d1ba7339975afa0_icgraph">
<area shape="rect" id="node2" href="server_8h.html#ad9ed9b81c1a3ec9299e894c5986c42e6" title="free_channel_list" alt="" coords="147,5,267,32"/>
<area shape="rect" id="node3" href="server_8h.html#ade7cba4847a297abf811114846d62cac" title="remove_channel" alt="" coords="148,56,265,83"/>
</map>
</div>

</div>
</div>
<a id="ae86be37e5d76544c9d6feb9d7b9b6b02"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae86be37e5d76544c9d6feb9d7b9b6b02">&#9670;&nbsp;</a></span>get_chan_by_name()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structt__channel.html">t_channel</a>* get_chan_by_name </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structt__channel.html">t_channel</a> *&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>channame</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get the <a class="el" href="structt__channel.html">t_channel</a> pointer by its name </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>the channel list </td></tr>
    <tr><td class="paramname">channame</td><td>the resquested channel </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a <a class="el" href="structt__channel.html">t_channel</a> pointer if exists , NULL otherwise </dd></dl>

<p class="definition">Definition at line <a class="el" href="lists__helpers_8c_source.html#l00044">44</a> of file <a class="el" href="lists__helpers_8c_source.html">lists_helpers.c</a>.</p>

<p class="reference">References <a class="el" href="server_8h_source.html#l00125">t_channel::next</a>.</p>

<p class="reference">Referenced by <a class="el" href="rfc__cmds0_8c_source.html#l00019">join()</a>, and <a class="el" href="rfc__cmds1_8c_source.html#l00054">privmsg()</a>.</p>
<div class="fragment"><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;{</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        <a class="code" href="structt__channel.html">t_channel</a> *rt = NULL;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;        <span class="keywordflow">for</span> (<a class="code" href="structt__channel.html">t_channel</a> *tmp = list; tmp; tmp = tmp-&gt;<a class="code" href="structt__channel.html#ad735fa416150cd0bbd1ce42e82a1c1fa">next</a>) {</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;                <span class="keywordflow">if</span> (!strcmp(tmp-&gt;channame, channame)) {</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;                        rt = tmp;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;                        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;                }</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        }</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        <span class="keywordflow">return</span> (rt);</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;}</div><div class="ttc" id="structt__channel_html_ad735fa416150cd0bbd1ce42e82a1c1fa"><div class="ttname"><a href="structt__channel.html#ad735fa416150cd0bbd1ce42e82a1c1fa">t_channel::next</a></div><div class="ttdeci">struct s_channel * next</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00125">server.h:125</a></div></div>
<div class="ttc" id="structt__channel_html"><div class="ttname"><a href="structt__channel.html">t_channel</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00121">server.h:121</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_ae86be37e5d76544c9d6feb9d7b9b6b02_icgraph.png" border="0" usemap="#server_8h_ae86be37e5d76544c9d6feb9d7b9b6b02_icgraph" alt=""/></div>
<map name="server_8h_ae86be37e5d76544c9d6feb9d7b9b6b02_icgraph" id="server_8h_ae86be37e5d76544c9d6feb9d7b9b6b02_icgraph">
<area shape="rect" id="node2" href="server_8h.html#a7bc519f56f91233055c4bee31d1c33bb" title="join" alt="" coords="201,5,243,32"/>
<area shape="rect" id="node3" href="server_8h.html#aa5da766def7467ba7a3899fddbfcd278" title="privmsg" alt="" coords="188,56,256,83"/>
</map>
</div>

</div>
</div>
<a id="ac5949d17278df5e1ada98dca25ccd961"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac5949d17278df5e1ada98dca25ccd961">&#9670;&nbsp;</a></span>get_methods()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int get_methods </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>req</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>clifd</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>See <a class="el" href="commands__parsing_8c.html">server_src/commands_parsing.c</a></p>
<p>Match all methods in G_CMDS for a given req command string </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">req</td><td>the readed commands buffer </td></tr>
    <tr><td class="paramname">clifd</td><td>the client socket fd </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>could add compilation macro for debug print_2darray() calls but epitech norm insist on 20 line per function so ... </dd></dl>

<p class="definition">Definition at line <a class="el" href="commands__parsing_8c_source.html#l00073">73</a> of file <a class="el" href="commands__parsing_8c_source.html">commands_parsing.c</a>.</p>

<p class="reference">References <a class="el" href="commands__parsing_8c_source.html#l00014">free_buffers()</a>, <a class="el" href="server__decls_8c_source.html#l00018">G_CMDS</a>, <a class="el" href="server__decls_8c_source.html#l00012">G_PROTOS</a>, <a class="el" href="commands__parsing_8c_source.html#l00049">get_args()</a>, <a class="el" href="commands__parsing_8c_source.html#l00028">get_commands()</a>, <a class="el" href="channel__list_8c_source.html#l00089">init_default_channel()</a>, <a class="el" href="logs__helpers_8c_source.html#l00017">print_users_in_chans()</a>, and <a class="el" href="server_8h_source.html#l00022">REF_NB</a>.</p>

<p class="reference">Referenced by <a class="el" href="server__main_8c_source.html#l00043">evhandler()</a>.</p>
<div class="fragment"><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;{</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        <span class="keywordtype">int</span> index = 0;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;        <span class="keywordtype">char</span> **<a class="code" href="server_8h.html#abc9c1e6f561b7500f7ecb3813d272d20">cmds</a> = <a class="code" href="commands__parsing_8c.html#ae88af3c7c8c827d710efa585d851a414">get_commands</a>(req);</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        <span class="keywordtype">char</span> **args = NULL;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <span class="keyword">static</span> <a class="code" href="structt__channel.html">t_channel</a> *defchan = NULL;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        defchan = !defchan ? <a class="code" href="channel__list_8c.html#a1c3fc93845d179d198452e745f3460b1">init_default_channel</a>() : defchan;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; cmds[j]; ++j) {</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;                <span class="keywordflow">for</span> (index = 0; <a class="code" href="server__decls_8c.html#ae19e01ff7678899828036520edec313c">G_PROTOS</a>[index]; ++index) {</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;                        <span class="keywordflow">if</span> ((strstr(cmds[j], <a class="code" href="server__decls_8c.html#ae19e01ff7678899828036520edec313c">G_PROTOS</a>[index]))) {</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;                                args = <a class="code" href="commands__parsing_8c.html#ad7cc037b9642ffd85e521546772eceae">get_args</a>(cmds[j]);</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;                                <a class="code" href="server__decls_8c.html#a7bb29231b69e3767e187ffe5d5717b28">G_CMDS</a>[index](args, clifd, defchan);</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;                                <a class="code" href="commands__parsing_8c.html#a9bf380b201748032988ca121dc4ed068">free_buffers</a>(args);</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;                                <span class="keywordflow">break</span>;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;                        }</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;                }</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;        }</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        <a class="code" href="logs__helpers_8c.html#a805324e4c542079956ff84a290274d23">print_users_in_chans</a>(defchan, index);</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        <a class="code" href="commands__parsing_8c.html#a9bf380b201748032988ca121dc4ed068">free_buffers</a>(cmds);</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        <span class="keywordflow">return</span> ((index == <a class="code" href="server_8h.html#a9880cfe1f4eb3140da2095fd081282f5">REF_NB</a>) ? (0) : (index));</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;}</div><div class="ttc" id="logs__helpers_8c_html_a805324e4c542079956ff84a290274d23"><div class="ttname"><a href="logs__helpers_8c.html#a805324e4c542079956ff84a290274d23">print_users_in_chans</a></div><div class="ttdeci">void print_users_in_chans(t_channel *chanlist, int index)</div><div class="ttdef"><b>Definition:</b> <a href="logs__helpers_8c_source.html#l00017">logs_helpers.c:17</a></div></div>
<div class="ttc" id="server__decls_8c_html_a7bb29231b69e3767e187ffe5d5717b28"><div class="ttname"><a href="server__decls_8c.html#a7bb29231b69e3767e187ffe5d5717b28">G_CMDS</a></div><div class="ttdeci">const cmds G_CMDS[REF_NB]</div><div class="ttdef"><b>Definition:</b> <a href="server__decls_8c_source.html#l00018">server_decls.c:18</a></div></div>
<div class="ttc" id="commands__parsing_8c_html_a9bf380b201748032988ca121dc4ed068"><div class="ttname"><a href="commands__parsing_8c.html#a9bf380b201748032988ca121dc4ed068">free_buffers</a></div><div class="ttdeci">static void free_buffers(char **buffer)</div><div class="ttdef"><b>Definition:</b> <a href="commands__parsing_8c_source.html#l00014">commands_parsing.c:14</a></div></div>
<div class="ttc" id="commands__parsing_8c_html_ad7cc037b9642ffd85e521546772eceae"><div class="ttname"><a href="commands__parsing_8c.html#ad7cc037b9642ffd85e521546772eceae">get_args</a></div><div class="ttdeci">static char ** get_args(char *cmd)</div><div class="ttdef"><b>Definition:</b> <a href="commands__parsing_8c_source.html#l00049">commands_parsing.c:49</a></div></div>
<div class="ttc" id="commands__parsing_8c_html_ae88af3c7c8c827d710efa585d851a414"><div class="ttname"><a href="commands__parsing_8c.html#ae88af3c7c8c827d710efa585d851a414">get_commands</a></div><div class="ttdeci">static char ** get_commands(char *req)</div><div class="ttdef"><b>Definition:</b> <a href="commands__parsing_8c_source.html#l00028">commands_parsing.c:28</a></div></div>
<div class="ttc" id="server_8h_html_a9880cfe1f4eb3140da2095fd081282f5"><div class="ttname"><a href="server_8h.html#a9880cfe1f4eb3140da2095fd081282f5">REF_NB</a></div><div class="ttdeci">#define REF_NB</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00022">server.h:22</a></div></div>
<div class="ttc" id="structt__channel_html"><div class="ttname"><a href="structt__channel.html">t_channel</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00121">server.h:121</a></div></div>
<div class="ttc" id="channel__list_8c_html_a1c3fc93845d179d198452e745f3460b1"><div class="ttname"><a href="channel__list_8c.html#a1c3fc93845d179d198452e745f3460b1">init_default_channel</a></div><div class="ttdeci">t_channel * init_default_channel(void)</div><div class="ttdef"><b>Definition:</b> <a href="channel__list_8c_source.html#l00089">channel_list.c:89</a></div></div>
<div class="ttc" id="server__decls_8c_html_ae19e01ff7678899828036520edec313c"><div class="ttname"><a href="server__decls_8c.html#ae19e01ff7678899828036520edec313c">G_PROTOS</a></div><div class="ttdeci">const char * G_PROTOS[REF_NB]</div><div class="ttdef"><b>Definition:</b> <a href="server__decls_8c_source.html#l00012">server_decls.c:12</a></div></div>
<div class="ttc" id="server_8h_html_abc9c1e6f561b7500f7ecb3813d272d20"><div class="ttname"><a href="server_8h.html#abc9c1e6f561b7500f7ecb3813d272d20">cmds</a></div><div class="ttdeci">void *(* cmds)(cmdargs args, int clifd, t_channel *chanlist)</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00175">server.h:175</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_ac5949d17278df5e1ada98dca25ccd961_cgraph.png" border="0" usemap="#server_8h_ac5949d17278df5e1ada98dca25ccd961_cgraph" alt=""/></div>
<map name="server_8h_ac5949d17278df5e1ada98dca25ccd961_cgraph" id="server_8h_ac5949d17278df5e1ada98dca25ccd961_cgraph">
<area shape="rect" id="node2" href="commands__parsing_8c.html#a9bf380b201748032988ca121dc4ed068" title="free_buffers" alt="" coords="178,5,269,32"/>
<area shape="rect" id="node3" href="commands__parsing_8c.html#ad7cc037b9642ffd85e521546772eceae" title="get_args" alt="" coords="187,56,259,83"/>
<area shape="rect" id="node4" href="commands__parsing_8c.html#ae88af3c7c8c827d710efa585d851a414" title="get_commands" alt="" coords="168,107,279,133"/>
<area shape="rect" id="node5" href="channel__list_8c.html#a1c3fc93845d179d198452e745f3460b1" title="init_default_channel" alt="" coords="155,157,292,184"/>
<area shape="rect" id="node8" href="logs__helpers_8c.html#a805324e4c542079956ff84a290274d23" title="print_users_in_chans" alt="" coords="151,208,296,235"/>
<area shape="rect" id="node6" href="user__list_8c.html#ace045c243817cc0c9885bdf3b41263c0" title="get_new_user" alt="" coords="353,107,455,133"/>
<area shape="rect" id="node7" href="user__list_8c.html#a1cf3d818bc2607cb0f69c043dba3c039" title="get_new_userlist" alt="" coords="344,157,464,184"/>
<area shape="rect" id="node9" href="logs__helpers_8c.html#a45c9c768c2486ac046ac242d3c46aadb" title="print_users" alt="" coords="361,208,447,235"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_ac5949d17278df5e1ada98dca25ccd961_icgraph.png" border="0" usemap="#server_8h_ac5949d17278df5e1ada98dca25ccd961_icgraph" alt=""/></div>
<map name="server_8h_ac5949d17278df5e1ada98dca25ccd961_icgraph" id="server_8h_ac5949d17278df5e1ada98dca25ccd961_icgraph">
<area shape="rect" id="node2" href="server__main_8c.html#a4178685c6a99dba7611faf9fe58f1a54" title="evhandler" alt="" coords="151,5,229,32"/>
<area shape="rect" id="node3" href="server__main_8c.html#a825c9cedc1751b000c44487b4233c37c" title="getactiveclients" alt="" coords="277,5,391,32"/>
<area shape="rect" id="node4" href="server__main_8c.html#af3e041546aaed3cd242c2b0e77162b39" title="server" alt="" coords="439,5,497,32"/>
<area shape="rect" id="node5" href="server__main_8c.html#a0c99d968a34e803d378692bde2e3f18f" title="main" alt="" coords="545,5,596,32"/>
</map>
</div>

</div>
</div>
<a id="a46341819e18479370867b55731a6c6dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a46341819e18479370867b55731a6c6dd">&#9670;&nbsp;</a></span>get_new_chan_list()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structt__channel.html">t_channel</a>* get_new_chan_list </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structt__userlist.html">t_userlist</a> *&#160;</td>
          <td class="paramname"><em>userlist</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>channame</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Self explanatory </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">userlist</td><td>the userlist to insert in the new channel element </td></tr>
    <tr><td class="paramname">channame</td><td>the new channel name </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="channel__list_8c_source.html#l00015">15</a> of file <a class="el" href="channel__list_8c_source.html">channel_list.c</a>.</p>

<p class="reference">References <a class="el" href="server_8h_source.html#l00122">t_channel::channame</a>, <a class="el" href="server_8h_source.html#l00125">t_channel::next</a>, <a class="el" href="server_8h_source.html#l00124">t_channel::prev</a>, and <a class="el" href="server_8h_source.html#l00123">t_channel::users</a>.</p>

<p class="reference">Referenced by <a class="el" href="rfc__cmds0_8c_source.html#l00019">join()</a>.</p>
<div class="fragment"><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;{</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;        <a class="code" href="structt__channel.html">t_channel</a> *list = malloc(<span class="keyword">sizeof</span>(*list));</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;        <span class="keywordflow">if</span> (list) {</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;                memset(list, 0, <span class="keyword">sizeof</span>(*list));</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;                list-&gt;<a class="code" href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">users</a> = userlist;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;                list-&gt;<a class="code" href="structt__channel.html#a8d701df6c8b899848e450905cf1e70dd">channame</a> = strdup(channame);</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;                list-&gt;<a class="code" href="structt__channel.html#abfb3b9e078736d58b484451cab52671c">prev</a> = NULL;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;                list-&gt;<a class="code" href="structt__channel.html#ad735fa416150cd0bbd1ce42e82a1c1fa">next</a> = NULL;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;        }</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;        <span class="keywordflow">return</span> (list);</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;}</div><div class="ttc" id="structt__channel_html_abfb3b9e078736d58b484451cab52671c"><div class="ttname"><a href="structt__channel.html#abfb3b9e078736d58b484451cab52671c">t_channel::prev</a></div><div class="ttdeci">struct s_channel * prev</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00124">server.h:124</a></div></div>
<div class="ttc" id="structt__channel_html_a8097607fae5d78c98125bac6caaefe18"><div class="ttname"><a href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">t_channel::users</a></div><div class="ttdeci">t_userlist * users</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00123">server.h:123</a></div></div>
<div class="ttc" id="structt__channel_html_ad735fa416150cd0bbd1ce42e82a1c1fa"><div class="ttname"><a href="structt__channel.html#ad735fa416150cd0bbd1ce42e82a1c1fa">t_channel::next</a></div><div class="ttdeci">struct s_channel * next</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00125">server.h:125</a></div></div>
<div class="ttc" id="structt__channel_html"><div class="ttname"><a href="structt__channel.html">t_channel</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00121">server.h:121</a></div></div>
<div class="ttc" id="structt__channel_html_a8d701df6c8b899848e450905cf1e70dd"><div class="ttname"><a href="structt__channel.html#a8d701df6c8b899848e450905cf1e70dd">t_channel::channame</a></div><div class="ttdeci">char * channame</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00122">server.h:122</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_a46341819e18479370867b55731a6c6dd_icgraph.png" border="0" usemap="#server_8h_a46341819e18479370867b55731a6c6dd_icgraph" alt=""/></div>
<map name="server_8h_a46341819e18479370867b55731a6c6dd_icgraph" id="server_8h_a46341819e18479370867b55731a6c6dd_icgraph">
<area shape="rect" id="node2" href="server_8h.html#a7bc519f56f91233055c4bee31d1c33bb" title="join" alt="" coords="184,5,227,32"/>
</map>
</div>

</div>
</div>
<a id="ace045c243817cc0c9885bdf3b41263c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ace045c243817cc0c9885bdf3b41263c0">&#9670;&nbsp;</a></span>get_new_user()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structt__user.html">t_user</a>* get_new_user </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>clifd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="server_8h.html#acfbe918d8821ff3d1d8dc2c90bb8f6a2">cmdargs</a>&#160;</td>
          <td class="paramname"><em>usercmd</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Malloc and memset a new <a class="el" href="structt__user.html">t_user</a> element </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">clifd</td><td>the user client file descriptor </td></tr>
    <tr><td class="paramname">usercmd</td><td>the USER &lt;space&gt; args 2d array </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>list the new element </dd></dl>

<p class="definition">Definition at line <a class="el" href="user__list_8c_source.html#l00016">16</a> of file <a class="el" href="user__list_8c_source.html">user_list.c</a>.</p>

<p class="reference">References <a class="el" href="server_8h_source.html#l00106">t_user::clifd</a>, <a class="el" href="server_8h_source.html#l00107">t_user::mode</a>, <a class="el" href="server_8h_source.html#l00108">t_user::nick</a>, and <a class="el" href="server_8h_source.html#l00109">t_user::rname</a>.</p>

<p class="reference">Referenced by <a class="el" href="channel__list_8c_source.html#l00089">init_default_channel()</a>, and <a class="el" href="rfc__cmds0_8c_source.html#l00081">user()</a>.</p>
<div class="fragment"><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;{</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;        <a class="code" href="structt__user.html">t_user</a> *usr = malloc(<span class="keyword">sizeof</span>(*usr));</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        <span class="keywordflow">if</span> (usr) {</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;                memset(usr, 0, <span class="keyword">sizeof</span>(*usr));</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;                usr-&gt;<a class="code" href="structt__user.html#a29a8abb5e21ec4d86ce72c756b6b43e4">clifd</a> = clifd;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;                usr-&gt;<a class="code" href="structt__user.html#a07771e89e3c3c41d675b9529c438fb2e">mode</a> = atoi(usercmd[2]);</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;                usr-&gt;<a class="code" href="structt__user.html#ae26ce5e41546b895d8d85f3cde41c096">nick</a> = strdup(usercmd[1]);</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;                usr-&gt;<a class="code" href="structt__user.html#ab3e2136d7c7ee26a1403bb5fc7f48d8e">rname</a> = strdup(usercmd[4]);</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;        }</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;        <span class="keywordflow">return</span> (usr);</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;}</div><div class="ttc" id="structt__user_html_ab3e2136d7c7ee26a1403bb5fc7f48d8e"><div class="ttname"><a href="structt__user.html#ab3e2136d7c7ee26a1403bb5fc7f48d8e">t_user::rname</a></div><div class="ttdeci">char * rname</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00109">server.h:109</a></div></div>
<div class="ttc" id="structt__user_html"><div class="ttname"><a href="structt__user.html">t_user</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00105">server.h:105</a></div></div>
<div class="ttc" id="structt__user_html_a07771e89e3c3c41d675b9529c438fb2e"><div class="ttname"><a href="structt__user.html#a07771e89e3c3c41d675b9529c438fb2e">t_user::mode</a></div><div class="ttdeci">int mode</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00107">server.h:107</a></div></div>
<div class="ttc" id="structt__user_html_a29a8abb5e21ec4d86ce72c756b6b43e4"><div class="ttname"><a href="structt__user.html#a29a8abb5e21ec4d86ce72c756b6b43e4">t_user::clifd</a></div><div class="ttdeci">int clifd</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00106">server.h:106</a></div></div>
<div class="ttc" id="structt__user_html_ae26ce5e41546b895d8d85f3cde41c096"><div class="ttname"><a href="structt__user.html#ae26ce5e41546b895d8d85f3cde41c096">t_user::nick</a></div><div class="ttdeci">char * nick</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00108">server.h:108</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_ace045c243817cc0c9885bdf3b41263c0_icgraph.png" border="0" usemap="#server_8h_ace045c243817cc0c9885bdf3b41263c0_icgraph" alt=""/></div>
<map name="server_8h_ace045c243817cc0c9885bdf3b41263c0_icgraph" id="server_8h_ace045c243817cc0c9885bdf3b41263c0_icgraph">
<area shape="rect" id="node2" href="server_8h.html#a1c3fc93845d179d198452e745f3460b1" title="init_default_channel" alt="" coords="156,5,293,32"/>
<area shape="rect" id="node8" href="server_8h.html#ac36f6273cc3b6d793ac67fd4ab88fbc4" title="user" alt="" coords="201,56,248,83"/>
<area shape="rect" id="node3" href="server_8h.html#ac5949d17278df5e1ada98dca25ccd961" title="get_methods" alt="" coords="341,5,439,32"/>
<area shape="rect" id="node4" href="server__main_8c.html#a4178685c6a99dba7611faf9fe58f1a54" title="evhandler" alt="" coords="487,5,565,32"/>
<area shape="rect" id="node5" href="server__main_8c.html#a825c9cedc1751b000c44487b4233c37c" title="getactiveclients" alt="" coords="613,5,727,32"/>
<area shape="rect" id="node6" href="server__main_8c.html#af3e041546aaed3cd242c2b0e77162b39" title="server" alt="" coords="775,5,833,32"/>
<area shape="rect" id="node7" href="server__main_8c.html#a0c99d968a34e803d378692bde2e3f18f" title="main" alt="" coords="881,5,932,32"/>
</map>
</div>

</div>
</div>
<a id="a1cf3d818bc2607cb0f69c043dba3c039"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1cf3d818bc2607cb0f69c043dba3c039">&#9670;&nbsp;</a></span>get_new_userlist()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structt__userlist.html">t_userlist</a>* get_new_userlist </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structt__user.html">t_user</a> *&#160;</td>
          <td class="paramname"><em>usr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>See server_src/client_list.c</p>
<p>Malloc and memset a new userlist element </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">usr</td><td>the <a class="el" href="structt__user.html">t_user</a> on the userlist </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>list the new element </dd></dl>

<p class="definition">Definition at line <a class="el" href="user__list_8c_source.html#l00034">34</a> of file <a class="el" href="user__list_8c_source.html">user_list.c</a>.</p>

<p class="reference">References <a class="el" href="server_8h_source.html#l00117">t_userlist::next</a>, <a class="el" href="server_8h_source.html#l00116">t_userlist::prev</a>, and <a class="el" href="server_8h_source.html#l00115">t_userlist::user</a>.</p>

<p class="reference">Referenced by <a class="el" href="channel__list_8c_source.html#l00089">init_default_channel()</a>, <a class="el" href="rfc__cmds0_8c_source.html#l00019">join()</a>, and <a class="el" href="rfc__cmds0_8c_source.html#l00081">user()</a>.</p>
<div class="fragment"><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;{</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <a class="code" href="structt__userlist.html">t_userlist</a> *list = malloc(<span class="keyword">sizeof</span>(*list));</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        <span class="keywordflow">if</span> (list) {</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;                memset(list, 0, <span class="keyword">sizeof</span>(*list));</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;                list-&gt;<a class="code" href="structt__userlist.html#a946f5b9e4c5110372550989a019ce21b">user</a> = usr;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;                list-&gt;<a class="code" href="structt__userlist.html#a0d21cffe5acee2678380dd0ebf7ae85c">prev</a> = NULL;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;                list-&gt;<a class="code" href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">next</a> = NULL;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        }</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        <span class="keywordflow">return</span> (list);</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;}</div><div class="ttc" id="structt__userlist_html"><div class="ttname"><a href="structt__userlist.html">t_userlist</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00114">server.h:114</a></div></div>
<div class="ttc" id="structt__userlist_html_a946f5b9e4c5110372550989a019ce21b"><div class="ttname"><a href="structt__userlist.html#a946f5b9e4c5110372550989a019ce21b">t_userlist::user</a></div><div class="ttdeci">t_user * user</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00115">server.h:115</a></div></div>
<div class="ttc" id="structt__userlist_html_a0d21cffe5acee2678380dd0ebf7ae85c"><div class="ttname"><a href="structt__userlist.html#a0d21cffe5acee2678380dd0ebf7ae85c">t_userlist::prev</a></div><div class="ttdeci">struct s_userlist * prev</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00116">server.h:116</a></div></div>
<div class="ttc" id="structt__userlist_html_a3b987a9a352379a703da737198b42d4a"><div class="ttname"><a href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">t_userlist::next</a></div><div class="ttdeci">struct s_userlist * next</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00117">server.h:117</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_a1cf3d818bc2607cb0f69c043dba3c039_icgraph.png" border="0" usemap="#server_8h_a1cf3d818bc2607cb0f69c043dba3c039_icgraph" alt=""/></div>
<map name="server_8h_a1cf3d818bc2607cb0f69c043dba3c039_icgraph" id="server_8h_a1cf3d818bc2607cb0f69c043dba3c039_icgraph">
<area shape="rect" id="node2" href="server_8h.html#a1c3fc93845d179d198452e745f3460b1" title="init_default_channel" alt="" coords="173,5,311,32"/>
<area shape="rect" id="node8" href="server_8h.html#a7bc519f56f91233055c4bee31d1c33bb" title="join" alt="" coords="221,56,263,83"/>
<area shape="rect" id="node9" href="server_8h.html#ac36f6273cc3b6d793ac67fd4ab88fbc4" title="user" alt="" coords="219,107,265,133"/>
<area shape="rect" id="node3" href="server_8h.html#ac5949d17278df5e1ada98dca25ccd961" title="get_methods" alt="" coords="359,5,456,32"/>
<area shape="rect" id="node4" href="server__main_8c.html#a4178685c6a99dba7611faf9fe58f1a54" title="evhandler" alt="" coords="504,5,583,32"/>
<area shape="rect" id="node5" href="server__main_8c.html#a825c9cedc1751b000c44487b4233c37c" title="getactiveclients" alt="" coords="631,5,744,32"/>
<area shape="rect" id="node6" href="server__main_8c.html#af3e041546aaed3cd242c2b0e77162b39" title="server" alt="" coords="792,5,851,32"/>
<area shape="rect" id="node7" href="server__main_8c.html#a0c99d968a34e803d378692bde2e3f18f" title="main" alt="" coords="899,5,949,32"/>
</map>
</div>

</div>
</div>
<a id="a5c9b2cd4523b5cc43326163d534225d9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c9b2cd4523b5cc43326163d534225d9">&#9670;&nbsp;</a></span>get_size()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int get_size </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="server_8h.html#acfbe918d8821ff3d1d8dc2c90bb8f6a2">cmdargs</a>&#160;</td>
          <td class="paramname"><em>args</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="lists__helpers_8c_source.html#l00011">11</a> of file <a class="el" href="lists__helpers_8c_source.html">lists_helpers.c</a>.</p>

<p class="reference">Referenced by <a class="el" href="rfc__cmds0_8c_source.html#l00081">user()</a>.</p>
<div class="fragment"><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;{</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;        <span class="keywordflow">while</span> (args[i])</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;                ++i;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;        <span class="keywordflow">return</span> (i);</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;}</div></div><!-- fragment --><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_a5c9b2cd4523b5cc43326163d534225d9_icgraph.png" border="0" usemap="#server_8h_a5c9b2cd4523b5cc43326163d534225d9_icgraph" alt=""/></div>
<map name="server_8h_a5c9b2cd4523b5cc43326163d534225d9_icgraph" id="server_8h_a5c9b2cd4523b5cc43326163d534225d9_icgraph">
<area shape="rect" id="node2" href="server_8h.html#ac36f6273cc3b6d793ac67fd4ab88fbc4" title="user" alt="" coords="124,5,171,32"/>
</map>
</div>

</div>
</div>
<a id="a1c3fc93845d179d198452e745f3460b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1c3fc93845d179d198452e745f3460b1">&#9670;&nbsp;</a></span>init_default_channel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structt__channel.html">t_channel</a>* init_default_channel </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>See <a class="el" href="channel__list_8c.html">server_src/channel_list.c</a></p>
<p>Self explanatory </p><dl class="section return"><dt>Returns</dt><dd>the default channel where all user resides </dd></dl>
<dl class="section note"><dt>Note</dt><dd>the channel name, the default user and all could be parsed from a config file (#pullrequestIdea) </dd></dl>

<p class="definition">Definition at line <a class="el" href="channel__list_8c_source.html#l00089">89</a> of file <a class="el" href="channel__list_8c_source.html">channel_list.c</a>.</p>

<p class="reference">References <a class="el" href="server_8h_source.html#l00122">t_channel::channame</a>, <a class="el" href="user__list_8c_source.html#l00016">get_new_user()</a>, <a class="el" href="user__list_8c_source.html#l00034">get_new_userlist()</a>, <a class="el" href="server_8h_source.html#l00125">t_channel::next</a>, <a class="el" href="server_8h_source.html#l00124">t_channel::prev</a>, and <a class="el" href="server_8h_source.html#l00123">t_channel::users</a>.</p>

<p class="reference">Referenced by <a class="el" href="commands__parsing_8c_source.html#l00073">get_methods()</a>.</p>
<div class="fragment"><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;{</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        <span class="keywordtype">char</span> *defuser[5] = {<span class="stringliteral">&quot;NICK&quot;</span>, <span class="stringliteral">&quot;4Dm1n&quot;</span>, <span class="stringliteral">&quot;42&quot;</span>, <span class="stringliteral">&quot;*&quot;</span>, <span class="stringliteral">&quot;:John Doe&quot;</span>};</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        <a class="code" href="structt__channel.html">t_channel</a> *defchan = malloc(<span class="keyword">sizeof</span>(*defchan));</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        <a class="code" href="structt__user.html">t_user</a> *admin = <a class="code" href="user__list_8c.html#ace045c243817cc0c9885bdf3b41263c0">get_new_user</a>(0, defuser);</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        <a class="code" href="structt__userlist.html">t_userlist</a> *allusers = <a class="code" href="user__list_8c.html#a1cf3d818bc2607cb0f69c043dba3c039">get_new_userlist</a>(admin);</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        <span class="keywordflow">if</span> (defchan &amp;&amp; admin &amp;&amp; allusers) {</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;                defchan-&gt;<a class="code" href="structt__channel.html#a8d701df6c8b899848e450905cf1e70dd">channame</a> = <span class="stringliteral">&quot;#welcome&quot;</span>;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;                defchan-&gt;<a class="code" href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">users</a> = allusers;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;                defchan-&gt;<a class="code" href="structt__channel.html#abfb3b9e078736d58b484451cab52671c">prev</a> = NULL;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;                defchan-&gt;<a class="code" href="structt__channel.html#ad735fa416150cd0bbd1ce42e82a1c1fa">next</a> = NULL;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;        }</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        <span class="keywordflow">return</span> (defchan);</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;}</div><div class="ttc" id="structt__channel_html_abfb3b9e078736d58b484451cab52671c"><div class="ttname"><a href="structt__channel.html#abfb3b9e078736d58b484451cab52671c">t_channel::prev</a></div><div class="ttdeci">struct s_channel * prev</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00124">server.h:124</a></div></div>
<div class="ttc" id="structt__userlist_html"><div class="ttname"><a href="structt__userlist.html">t_userlist</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00114">server.h:114</a></div></div>
<div class="ttc" id="structt__channel_html_a8097607fae5d78c98125bac6caaefe18"><div class="ttname"><a href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">t_channel::users</a></div><div class="ttdeci">t_userlist * users</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00123">server.h:123</a></div></div>
<div class="ttc" id="structt__channel_html_ad735fa416150cd0bbd1ce42e82a1c1fa"><div class="ttname"><a href="structt__channel.html#ad735fa416150cd0bbd1ce42e82a1c1fa">t_channel::next</a></div><div class="ttdeci">struct s_channel * next</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00125">server.h:125</a></div></div>
<div class="ttc" id="structt__user_html"><div class="ttname"><a href="structt__user.html">t_user</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00105">server.h:105</a></div></div>
<div class="ttc" id="structt__channel_html"><div class="ttname"><a href="structt__channel.html">t_channel</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00121">server.h:121</a></div></div>
<div class="ttc" id="user__list_8c_html_a1cf3d818bc2607cb0f69c043dba3c039"><div class="ttname"><a href="user__list_8c.html#a1cf3d818bc2607cb0f69c043dba3c039">get_new_userlist</a></div><div class="ttdeci">t_userlist * get_new_userlist(t_user *usr)</div><div class="ttdef"><b>Definition:</b> <a href="user__list_8c_source.html#l00034">user_list.c:34</a></div></div>
<div class="ttc" id="structt__channel_html_a8d701df6c8b899848e450905cf1e70dd"><div class="ttname"><a href="structt__channel.html#a8d701df6c8b899848e450905cf1e70dd">t_channel::channame</a></div><div class="ttdeci">char * channame</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00122">server.h:122</a></div></div>
<div class="ttc" id="user__list_8c_html_ace045c243817cc0c9885bdf3b41263c0"><div class="ttname"><a href="user__list_8c.html#ace045c243817cc0c9885bdf3b41263c0">get_new_user</a></div><div class="ttdeci">t_user * get_new_user(int clifd, cmdargs usercmd)</div><div class="ttdef"><b>Definition:</b> <a href="user__list_8c_source.html#l00016">user_list.c:16</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_a1c3fc93845d179d198452e745f3460b1_cgraph.png" border="0" usemap="#server_8h_a1c3fc93845d179d198452e745f3460b1_cgraph" alt=""/></div>
<map name="server_8h_a1c3fc93845d179d198452e745f3460b1_cgraph" id="server_8h_a1c3fc93845d179d198452e745f3460b1_cgraph">
<area shape="rect" id="node2" href="user__list_8c.html#ace045c243817cc0c9885bdf3b41263c0" title="get_new_user" alt="" coords="199,5,302,32"/>
<area shape="rect" id="node3" href="user__list_8c.html#a1cf3d818bc2607cb0f69c043dba3c039" title="get_new_userlist" alt="" coords="191,56,311,83"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_a1c3fc93845d179d198452e745f3460b1_icgraph.png" border="0" usemap="#server_8h_a1c3fc93845d179d198452e745f3460b1_icgraph" alt=""/></div>
<map name="server_8h_a1c3fc93845d179d198452e745f3460b1_icgraph" id="server_8h_a1c3fc93845d179d198452e745f3460b1_icgraph">
<area shape="rect" id="node2" href="server_8h.html#ac5949d17278df5e1ada98dca25ccd961" title="get_methods" alt="" coords="191,5,288,32"/>
<area shape="rect" id="node3" href="server__main_8c.html#a4178685c6a99dba7611faf9fe58f1a54" title="evhandler" alt="" coords="336,5,415,32"/>
<area shape="rect" id="node4" href="server__main_8c.html#a825c9cedc1751b000c44487b4233c37c" title="getactiveclients" alt="" coords="463,5,576,32"/>
<area shape="rect" id="node5" href="server__main_8c.html#af3e041546aaed3cd242c2b0e77162b39" title="server" alt="" coords="624,5,683,32"/>
<area shape="rect" id="node6" href="server__main_8c.html#a0c99d968a34e803d378692bde2e3f18f" title="main" alt="" coords="731,5,781,32"/>
</map>
</div>

</div>
</div>
<a id="a0f3f52d09747a128a3107f465a4f3421"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f3f52d09747a128a3107f465a4f3421">&#9670;&nbsp;</a></span>insert_back_channel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* insert_back_channel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structt__channel.html">t_channel</a> *&#160;</td>
          <td class="paramname"><em>head</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structt__channel.html">t_channel</a> *&#160;</td>
          <td class="paramname"><em>new</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Push back a new channel element to the main list container </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">head</td><td>the head pointer </td></tr>
    <tr><td class="paramname">new</td><td>the new channel element to be inserted </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="channel__list_8c_source.html#l00033">33</a> of file <a class="el" href="channel__list_8c_source.html">channel_list.c</a>.</p>

<p class="reference">References <a class="el" href="server_8h_source.html#l00125">t_channel::next</a>.</p>

<p class="reference">Referenced by <a class="el" href="rfc__cmds0_8c_source.html#l00019">join()</a>.</p>
<div class="fragment"><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;{</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;        <a class="code" href="structt__channel.html">t_channel</a> *tmp = head;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        <span class="keywordflow">if</span> (!head) {</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;                head = <span class="keyword">new</span>;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;                <span class="keywordflow">while</span> (tmp-&gt;<a class="code" href="structt__channel.html#ad735fa416150cd0bbd1ce42e82a1c1fa">next</a>) {</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;                        tmp = tmp-&gt;<a class="code" href="structt__channel.html#ad735fa416150cd0bbd1ce42e82a1c1fa">next</a>;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;                }</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;                tmp-&gt;<a class="code" href="structt__channel.html#ad735fa416150cd0bbd1ce42e82a1c1fa">next</a> = <span class="keyword">new</span>;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;                <span class="keyword">new</span>-&gt;prev = tmp;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        }</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        <span class="keywordflow">return</span> (head);</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;}</div><div class="ttc" id="structt__channel_html_ad735fa416150cd0bbd1ce42e82a1c1fa"><div class="ttname"><a href="structt__channel.html#ad735fa416150cd0bbd1ce42e82a1c1fa">t_channel::next</a></div><div class="ttdeci">struct s_channel * next</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00125">server.h:125</a></div></div>
<div class="ttc" id="structt__channel_html"><div class="ttname"><a href="structt__channel.html">t_channel</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00121">server.h:121</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_a0f3f52d09747a128a3107f465a4f3421_icgraph.png" border="0" usemap="#server_8h_a0f3f52d09747a128a3107f465a4f3421_icgraph" alt=""/></div>
<map name="server_8h_a0f3f52d09747a128a3107f465a4f3421_icgraph" id="server_8h_a0f3f52d09747a128a3107f465a4f3421_icgraph">
<area shape="rect" id="node2" href="server_8h.html#a7bc519f56f91233055c4bee31d1c33bb" title="join" alt="" coords="195,5,237,32"/>
</map>
</div>

</div>
</div>
<a id="a2b16f778b01689e31ef5530b66d41390"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b16f778b01689e31ef5530b66d41390">&#9670;&nbsp;</a></span>insert_back_user()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* insert_back_user </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structt__userlist.html">t_userlist</a> *&#160;</td>
          <td class="paramname"><em>head</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structt__userlist.html">t_userlist</a> *&#160;</td>
          <td class="paramname"><em>nuser</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Push back a n(ew)user in the userlist head </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">head</td><td>the userlist to be modified </td></tr>
    <tr><td class="paramname">nuser</td><td>the n(ew)user to be inserted </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>head the head pointer </dd></dl>

<p class="definition">Definition at line <a class="el" href="user__list_8c_source.html#l00052">52</a> of file <a class="el" href="user__list_8c_source.html">user_list.c</a>.</p>

<p class="reference">References <a class="el" href="server_8h_source.html#l00117">t_userlist::next</a>, and <a class="el" href="server_8h_source.html#l00116">t_userlist::prev</a>.</p>

<p class="reference">Referenced by <a class="el" href="rfc__cmds0_8c_source.html#l00019">join()</a>, and <a class="el" href="rfc__cmds0_8c_source.html#l00081">user()</a>.</p>
<div class="fragment"><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;{</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        <a class="code" href="structt__userlist.html">t_userlist</a> *tmp = head;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        <span class="keywordflow">if</span> (!head) {</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;                head = nuser;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;                <span class="keywordflow">while</span> (tmp-&gt;<a class="code" href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">next</a>) {</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;                        tmp = tmp-&gt;<a class="code" href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">next</a>;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;                }</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;                tmp-&gt;<a class="code" href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">next</a> = nuser;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;                nuser-&gt;<a class="code" href="structt__userlist.html#a0d21cffe5acee2678380dd0ebf7ae85c">prev</a> = tmp;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        }</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        <span class="keywordflow">return</span> (head);</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;}</div><div class="ttc" id="structt__userlist_html"><div class="ttname"><a href="structt__userlist.html">t_userlist</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00114">server.h:114</a></div></div>
<div class="ttc" id="structt__userlist_html_a0d21cffe5acee2678380dd0ebf7ae85c"><div class="ttname"><a href="structt__userlist.html#a0d21cffe5acee2678380dd0ebf7ae85c">t_userlist::prev</a></div><div class="ttdeci">struct s_userlist * prev</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00116">server.h:116</a></div></div>
<div class="ttc" id="structt__userlist_html_a3b987a9a352379a703da737198b42d4a"><div class="ttname"><a href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">t_userlist::next</a></div><div class="ttdeci">struct s_userlist * next</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00117">server.h:117</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_a2b16f778b01689e31ef5530b66d41390_icgraph.png" border="0" usemap="#server_8h_a2b16f778b01689e31ef5530b66d41390_icgraph" alt=""/></div>
<map name="server_8h_a2b16f778b01689e31ef5530b66d41390_icgraph" id="server_8h_a2b16f778b01689e31ef5530b66d41390_icgraph">
<area shape="rect" id="node2" href="server_8h.html#a7bc519f56f91233055c4bee31d1c33bb" title="join" alt="" coords="177,5,219,32"/>
<area shape="rect" id="node3" href="server_8h.html#ac36f6273cc3b6d793ac67fd4ab88fbc4" title="user" alt="" coords="175,56,221,83"/>
</map>
</div>

</div>
</div>
<a id="af9f57eda934151d707615e8f315e7897"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af9f57eda934151d707615e8f315e7897">&#9670;&nbsp;</a></span>is_user_in_chan()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int is_user_in_chan </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>clifd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structt__channel.html">t_channel</a> *&#160;</td>
          <td class="paramname"><em>chans</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="lists__helpers_8c_source.html#l00057">57</a> of file <a class="el" href="lists__helpers_8c_source.html">lists_helpers.c</a>.</p>

<p class="reference">References <a class="el" href="server_8h_source.html#l00122">t_channel::channame</a>, <a class="el" href="server_8h_source.html#l00117">t_userlist::next</a>, and <a class="el" href="server_8h_source.html#l00123">t_channel::users</a>.</p>

<p class="reference">Referenced by <a class="el" href="rfc__cmds0_8c_source.html#l00101">quit()</a>.</p>
<div class="fragment"><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;{</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <span class="keywordflow">for</span> (<a class="code" href="structt__userlist.html">t_userlist</a> *usrs = chans-&gt;<a class="code" href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">users</a>; usrs; usrs = usrs-&gt;<a class="code" href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">next</a>) {</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;                <span class="keywordflow">if</span> (clifd == usrs-&gt;user-&gt;clifd) {</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;                        printf(<span class="stringliteral">&quot;Chan name [%s] Is in list ? [%s]\n&quot;</span>,</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;                        chans-&gt;<a class="code" href="structt__channel.html#a8d701df6c8b899848e450905cf1e70dd">channame</a>, usrs-&gt;user-&gt;nick);</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;                        usrs-&gt;user-&gt;isco = <span class="keyword">false</span>;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;                }</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        }</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;        <span class="keywordflow">return</span> (1);</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;}</div><div class="ttc" id="structt__userlist_html"><div class="ttname"><a href="structt__userlist.html">t_userlist</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00114">server.h:114</a></div></div>
<div class="ttc" id="structt__channel_html_a8097607fae5d78c98125bac6caaefe18"><div class="ttname"><a href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">t_channel::users</a></div><div class="ttdeci">t_userlist * users</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00123">server.h:123</a></div></div>
<div class="ttc" id="structt__channel_html_a8d701df6c8b899848e450905cf1e70dd"><div class="ttname"><a href="structt__channel.html#a8d701df6c8b899848e450905cf1e70dd">t_channel::channame</a></div><div class="ttdeci">char * channame</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00122">server.h:122</a></div></div>
<div class="ttc" id="structt__userlist_html_a3b987a9a352379a703da737198b42d4a"><div class="ttname"><a href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">t_userlist::next</a></div><div class="ttdeci">struct s_userlist * next</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00117">server.h:117</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_af9f57eda934151d707615e8f315e7897_icgraph.png" border="0" usemap="#server_8h_af9f57eda934151d707615e8f315e7897_icgraph" alt=""/></div>
<map name="server_8h_af9f57eda934151d707615e8f315e7897_icgraph" id="server_8h_af9f57eda934151d707615e8f315e7897_icgraph">
<area shape="rect" id="node2" href="server_8h.html#a8a966c4254db49b02978407670cc9fa9" title="quit" alt="" coords="169,5,212,32"/>
</map>
</div>

</div>
</div>
<a id="a7bc519f56f91233055c4bee31d1c33bb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7bc519f56f91233055c4bee31d1c33bb">&#9670;&nbsp;</a></span>join()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* join </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="server_8h.html#acfbe918d8821ff3d1d8dc2c90bb8f6a2">cmdargs</a>&#160;</td>
          <td class="paramname"><em>args</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>clifd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structt__channel.html">t_channel</a> *&#160;</td>
          <td class="paramname"><em>chans</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The JOIN #&lt;channel&gt; command handler </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">args</td><td>the JOIN arguments, composed of the channel name started by '#' </td></tr>
    <tr><td class="paramname">clifd</td><td>the client file descriptor </td></tr>
    <tr><td class="paramname">chans</td><td>the main channel doubly linked list (updated if new channel) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>chans the head pointer of the channel list passed in params </dd></dl>
<dl class="section note"><dt>Note</dt><dd>see RFC 2812 part 3.2.1 </dd></dl>

<p class="definition">Definition at line <a class="el" href="rfc__cmds0_8c_source.html#l00019">19</a> of file <a class="el" href="rfc__cmds0_8c_source.html">rfc_cmds0.c</a>.</p>

<p class="reference">References <a class="el" href="lists__helpers_8c_source.html#l00026">find_user_by_fd()</a>, <a class="el" href="lists__helpers_8c_source.html#l00044">get_chan_by_name()</a>, <a class="el" href="channel__list_8c_source.html#l00015">get_new_chan_list()</a>, <a class="el" href="user__list_8c_source.html#l00034">get_new_userlist()</a>, <a class="el" href="channel__list_8c_source.html#l00033">insert_back_channel()</a>, <a class="el" href="user__list_8c_source.html#l00052">insert_back_user()</a>, <a class="el" href="server_8h_source.html#l00117">t_userlist::next</a>, <a class="el" href="server_8h_source.html#l00108">t_user::nick</a>, and <a class="el" href="server_8h_source.html#l00123">t_channel::users</a>.</p>
<div class="fragment"><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;{</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;        <a class="code" href="structt__user.html">t_user</a> *usr = <a class="code" href="lists__helpers_8c.html#a0195cd48a4c52a9624a811825cef8afb">find_user_by_fd</a>(chans-&gt;<a class="code" href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">users</a>, clifd);</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;        <a class="code" href="structt__userlist.html">t_userlist</a> *list = <a class="code" href="user__list_8c.html#a1cf3d818bc2607cb0f69c043dba3c039">get_new_userlist</a>(usr);</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;        <a class="code" href="structt__channel.html">t_channel</a> *rchan = <a class="code" href="lists__helpers_8c.html#ae86be37e5d76544c9d6feb9d7b9b6b02">get_chan_by_name</a>(chans, args[1]);</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;        <span class="keywordflow">if</span> (!rchan) {</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;                rchan = <a class="code" href="channel__list_8c.html#ab30bae85710efb83f84f2f60279750d4">get_new_chan_list</a>(list, args[1]);</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;                chans = <a class="code" href="channel__list_8c.html#a5050eeaaa964d8e01bb2a0bb28dd3092">insert_back_channel</a>(chans, rchan);</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!<a class="code" href="lists__helpers_8c.html#a0195cd48a4c52a9624a811825cef8afb">find_user_by_fd</a>(rchan-&gt;<a class="code" href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">users</a>, clifd)) {</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;                rchan-&gt;<a class="code" href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">users</a> = <a class="code" href="user__list_8c.html#a2b16f778b01689e31ef5530b66d41390">insert_back_user</a>(rchan-&gt;<a class="code" href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">users</a>, list);</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;        }</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;        <span class="keywordflow">for</span> (<a class="code" href="structt__userlist.html">t_userlist</a> *b = rchan-&gt;<a class="code" href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">users</a>; b; b = b-&gt;<a class="code" href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">next</a>) {</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;                dprintf(b-&gt;user-&gt;clifd, <span class="stringliteral">&quot;:%s JOIN :%s\r\n&quot;</span>, usr-&gt;<a class="code" href="structt__user.html#ae26ce5e41546b895d8d85f3cde41c096">nick</a>, args[1]);</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;        }</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;        dprintf(clifd, <span class="stringliteral">&quot;:server 331\r\n%s: no topic is set\r\n&quot;</span>, args[1]);</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;        <span class="keywordflow">return</span> (chans);</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;}</div><div class="ttc" id="user__list_8c_html_a2b16f778b01689e31ef5530b66d41390"><div class="ttname"><a href="user__list_8c.html#a2b16f778b01689e31ef5530b66d41390">insert_back_user</a></div><div class="ttdeci">void * insert_back_user(t_userlist *head, t_userlist *nuser)</div><div class="ttdef"><b>Definition:</b> <a href="user__list_8c_source.html#l00052">user_list.c:52</a></div></div>
<div class="ttc" id="structt__userlist_html"><div class="ttname"><a href="structt__userlist.html">t_userlist</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00114">server.h:114</a></div></div>
<div class="ttc" id="lists__helpers_8c_html_a0195cd48a4c52a9624a811825cef8afb"><div class="ttname"><a href="lists__helpers_8c.html#a0195cd48a4c52a9624a811825cef8afb">find_user_by_fd</a></div><div class="ttdeci">t_user * find_user_by_fd(t_userlist *list, int clifd)</div><div class="ttdef"><b>Definition:</b> <a href="lists__helpers_8c_source.html#l00026">lists_helpers.c:26</a></div></div>
<div class="ttc" id="channel__list_8c_html_ab30bae85710efb83f84f2f60279750d4"><div class="ttname"><a href="channel__list_8c.html#ab30bae85710efb83f84f2f60279750d4">get_new_chan_list</a></div><div class="ttdeci">t_channel * get_new_chan_list(t_userlist *userlist, char *channame)</div><div class="ttdef"><b>Definition:</b> <a href="channel__list_8c_source.html#l00015">channel_list.c:15</a></div></div>
<div class="ttc" id="structt__channel_html_a8097607fae5d78c98125bac6caaefe18"><div class="ttname"><a href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">t_channel::users</a></div><div class="ttdeci">t_userlist * users</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00123">server.h:123</a></div></div>
<div class="ttc" id="structt__user_html"><div class="ttname"><a href="structt__user.html">t_user</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00105">server.h:105</a></div></div>
<div class="ttc" id="structt__channel_html"><div class="ttname"><a href="structt__channel.html">t_channel</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00121">server.h:121</a></div></div>
<div class="ttc" id="user__list_8c_html_a1cf3d818bc2607cb0f69c043dba3c039"><div class="ttname"><a href="user__list_8c.html#a1cf3d818bc2607cb0f69c043dba3c039">get_new_userlist</a></div><div class="ttdeci">t_userlist * get_new_userlist(t_user *usr)</div><div class="ttdef"><b>Definition:</b> <a href="user__list_8c_source.html#l00034">user_list.c:34</a></div></div>
<div class="ttc" id="lists__helpers_8c_html_ae86be37e5d76544c9d6feb9d7b9b6b02"><div class="ttname"><a href="lists__helpers_8c.html#ae86be37e5d76544c9d6feb9d7b9b6b02">get_chan_by_name</a></div><div class="ttdeci">t_channel * get_chan_by_name(t_channel *list, char *channame)</div><div class="ttdef"><b>Definition:</b> <a href="lists__helpers_8c_source.html#l00044">lists_helpers.c:44</a></div></div>
<div class="ttc" id="channel__list_8c_html_a5050eeaaa964d8e01bb2a0bb28dd3092"><div class="ttname"><a href="channel__list_8c.html#a5050eeaaa964d8e01bb2a0bb28dd3092">insert_back_channel</a></div><div class="ttdeci">void * insert_back_channel(t_channel *head, t_channel *new)</div><div class="ttdef"><b>Definition:</b> <a href="channel__list_8c_source.html#l00033">channel_list.c:33</a></div></div>
<div class="ttc" id="structt__userlist_html_a3b987a9a352379a703da737198b42d4a"><div class="ttname"><a href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">t_userlist::next</a></div><div class="ttdeci">struct s_userlist * next</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00117">server.h:117</a></div></div>
<div class="ttc" id="structt__user_html_ae26ce5e41546b895d8d85f3cde41c096"><div class="ttname"><a href="structt__user.html#ae26ce5e41546b895d8d85f3cde41c096">t_user::nick</a></div><div class="ttdeci">char * nick</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00108">server.h:108</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_a7bc519f56f91233055c4bee31d1c33bb_cgraph.png" border="0" usemap="#server_8h_a7bc519f56f91233055c4bee31d1c33bb_cgraph" alt=""/></div>
<map name="server_8h_a7bc519f56f91233055c4bee31d1c33bb_cgraph" id="server_8h_a7bc519f56f91233055c4bee31d1c33bb_cgraph">
<area shape="rect" id="node2" href="lists__helpers_8c.html#a0195cd48a4c52a9624a811825cef8afb" title="find_user_by_fd" alt="" coords="109,5,224,32"/>
<area shape="rect" id="node3" href="lists__helpers_8c.html#ae86be37e5d76544c9d6feb9d7b9b6b02" title="get_chan_by_name" alt="" coords="99,56,234,83"/>
<area shape="rect" id="node4" href="channel__list_8c.html#ab30bae85710efb83f84f2f60279750d4" title="get_new_chan_list" alt="" coords="101,107,232,133"/>
<area shape="rect" id="node5" href="user__list_8c.html#a1cf3d818bc2607cb0f69c043dba3c039" title="get_new_userlist" alt="" coords="107,157,227,184"/>
<area shape="rect" id="node6" href="channel__list_8c.html#a5050eeaaa964d8e01bb2a0bb28dd3092" title="insert_back_channel" alt="" coords="96,208,237,235"/>
<area shape="rect" id="node7" href="user__list_8c.html#a2b16f778b01689e31ef5530b66d41390" title="insert_back_user" alt="" coords="106,259,227,285"/>
</map>
</div>

</div>
</div>
<a id="a7e2903ce4461ed71cf294dd675bd4c49"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7e2903ce4461ed71cf294dd675bd4c49">&#9670;&nbsp;</a></span>logthisevent()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int logthisevent </td>
          <td>(</td>
          <td class="paramtype">const char&#160;</td>
          <td class="paramname"><em>etype</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structt__serv.html">t_serv</a> *&#160;</td>
          <td class="paramname"><em>all</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>See <a class="el" href="logs__helpers_8c.html">server_src/logs_helpers.c</a></p>
<p>Switch type and print data in <a class="el" href="structt__serv.html">t_serv</a> according to a fmt string </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">etype</td><td>the kind of event type in [C]onnect, [D]isconnect or default </td></tr>
    <tr><td class="paramname">all</td><td>the 'catch them all' structure with server infos </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 </dd></dl>

<p class="definition">Definition at line <a class="el" href="logs__helpers_8c_source.html#l00059">59</a> of file <a class="el" href="logs__helpers_8c_source.html">logs_helpers.c</a>.</p>

<p class="reference">References <a class="el" href="server_8h_source.html#l00091">t_serv::buf</a>, <a class="el" href="logs__helpers_8c_source.html#l00043">get_host_string()</a>, <a class="el" href="server_8h_source.html#l00092">t_serv::host</a>, <a class="el" href="server_8h_source.html#l00090">t_serv::nread</a>, and <a class="el" href="server_8h_source.html#l00093">t_serv::service</a>.</p>

<p class="reference">Referenced by <a class="el" href="server__main_8c_source.html#l00043">evhandler()</a>.</p>
<div class="fragment"><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;{</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        <span class="keywordtype">char</span> *usr = <a class="code" href="logs__helpers_8c.html#a2bcab2bec250f4df132d9cfc8fa070f0">get_host_string</a>(all-&gt;<a class="code" href="structt__serv.html#a0dd3a9c2648da4fba88a38276803037c">host</a>, all-&gt;<a class="code" href="structt__serv.html#aee509c3823199bf9f0ad285a718260bd">service</a>);</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;        <span class="keywordtype">char</span> *c_fmt = <span class="stringliteral">&quot; = &gt; IN: [%zd bytes] FROM: [%s] DATA: [%s]\n&quot;</span>;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        <span class="keywordtype">char</span> *d_fmt = <span class="stringliteral">&quot;USER: [%s] disconnect\n&quot;</span>;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        <span class="keywordtype">char</span> *def_fmt = <span class="stringliteral">&quot;Type:%c Size:%zd DATA: [%s]\n&quot;</span>;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;        <span class="keywordflow">switch</span> (etype) {</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;                <span class="keywordflow">case</span> <span class="charliteral">&#39;c&#39;</span>:</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;                        fprintf(stdout, c_fmt, all-&gt;<a class="code" href="structt__serv.html#a85e55e3fe1bfb973e7f5d15a0a436b18">nread</a>, usr, all-&gt;<a class="code" href="structt__serv.html#a005714cf56aaffce970916774cf2b04a">buf</a>);</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;                        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;                <span class="keywordflow">case</span> <span class="charliteral">&#39;d&#39;</span>:</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;                        fprintf(stdout, d_fmt, usr);</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;                        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;                <span class="keywordflow">default</span>:</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;                        fprintf(stdout, def_fmt, etype, all-&gt;<a class="code" href="structt__serv.html#a85e55e3fe1bfb973e7f5d15a0a436b18">nread</a>, all-&gt;<a class="code" href="structt__serv.html#a005714cf56aaffce970916774cf2b04a">buf</a>);</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;                        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;        }</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        free(usr);</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <span class="keywordflow">return</span> (1);</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;}</div><div class="ttc" id="structt__serv_html_a005714cf56aaffce970916774cf2b04a"><div class="ttname"><a href="structt__serv.html#a005714cf56aaffce970916774cf2b04a">t_serv::buf</a></div><div class="ttdeci">char buf[BUF_SIZE]</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00091">server.h:91</a></div></div>
<div class="ttc" id="structt__serv_html_a0dd3a9c2648da4fba88a38276803037c"><div class="ttname"><a href="structt__serv.html#a0dd3a9c2648da4fba88a38276803037c">t_serv::host</a></div><div class="ttdeci">char host[NI_MAXHOST]</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00092">server.h:92</a></div></div>
<div class="ttc" id="structt__serv_html_a85e55e3fe1bfb973e7f5d15a0a436b18"><div class="ttname"><a href="structt__serv.html#a85e55e3fe1bfb973e7f5d15a0a436b18">t_serv::nread</a></div><div class="ttdeci">ssize_t nread</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00090">server.h:90</a></div></div>
<div class="ttc" id="structt__serv_html_aee509c3823199bf9f0ad285a718260bd"><div class="ttname"><a href="structt__serv.html#aee509c3823199bf9f0ad285a718260bd">t_serv::service</a></div><div class="ttdeci">char service[NI_MAXSERV]</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00093">server.h:93</a></div></div>
<div class="ttc" id="logs__helpers_8c_html_a2bcab2bec250f4df132d9cfc8fa070f0"><div class="ttname"><a href="logs__helpers_8c.html#a2bcab2bec250f4df132d9cfc8fa070f0">get_host_string</a></div><div class="ttdeci">static char * get_host_string(const char *host, const char *service)</div><div class="ttdef"><b>Definition:</b> <a href="logs__helpers_8c_source.html#l00043">logs_helpers.c:43</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_a7e2903ce4461ed71cf294dd675bd4c49_cgraph.png" border="0" usemap="#server_8h_a7e2903ce4461ed71cf294dd675bd4c49_cgraph" alt=""/></div>
<map name="server_8h_a7e2903ce4461ed71cf294dd675bd4c49_cgraph" id="server_8h_a7e2903ce4461ed71cf294dd675bd4c49_cgraph">
<area shape="rect" id="node2" href="logs__helpers_8c.html#a2bcab2bec250f4df132d9cfc8fa070f0" title="get_host_string" alt="" coords="145,5,256,32"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_a7e2903ce4461ed71cf294dd675bd4c49_icgraph.png" border="0" usemap="#server_8h_a7e2903ce4461ed71cf294dd675bd4c49_icgraph" alt=""/></div>
<map name="server_8h_a7e2903ce4461ed71cf294dd675bd4c49_icgraph" id="server_8h_a7e2903ce4461ed71cf294dd675bd4c49_icgraph">
<area shape="rect" id="node2" href="server__main_8c.html#a4178685c6a99dba7611faf9fe58f1a54" title="evhandler" alt="" coords="145,5,224,32"/>
<area shape="rect" id="node3" href="server__main_8c.html#a825c9cedc1751b000c44487b4233c37c" title="getactiveclients" alt="" coords="272,5,385,32"/>
<area shape="rect" id="node4" href="server__main_8c.html#af3e041546aaed3cd242c2b0e77162b39" title="server" alt="" coords="433,5,492,32"/>
<area shape="rect" id="node5" href="server__main_8c.html#a0c99d968a34e803d378692bde2e3f18f" title="main" alt="" coords="540,5,591,32"/>
</map>
</div>

</div>
</div>
<a id="a8193bc1dd3461f512b07b2a8c686ec9c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8193bc1dd3461f512b07b2a8c686ec9c">&#9670;&nbsp;</a></span>nick()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* nick </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="server_8h.html#acfbe918d8821ff3d1d8dc2c90bb8f6a2">cmdargs</a>&#160;</td>
          <td class="paramname"><em>args</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>clifd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structt__channel.html">t_channel</a> *&#160;</td>
          <td class="paramname"><em>chans</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The NICK &lt;nickname&gt; command handler handler </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">args</td><td>the NICK arguments, composed of the requested username </td></tr>
    <tr><td class="paramname">clifd</td><td>the client file descriptor (unusued) </td></tr>
    <tr><td class="paramname">chans</td><td>the main channel doubly linked list (unusued) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>chans the head pointer of the channel list passed in params </dd></dl>
<dl class="section note"><dt>Note</dt><dd>stil missing the update username and the error messages if nickname already in use, invalid nickname etc .. (see RFC 2812 part 3.1.2) </dd></dl>

<p class="definition">Definition at line <a class="el" href="rfc__cmds0_8c_source.html#l00046">46</a> of file <a class="el" href="rfc__cmds0_8c_source.html">rfc_cmds0.c</a>.</p>

<p class="reference">References <a class="el" href="server_8h_source.html#l00117">t_userlist::next</a>, and <a class="el" href="server_8h_source.html#l00123">t_channel::users</a>.</p>
<div class="fragment"><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;{</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;        <span class="keywordtype">char</span> *fmt = <span class="stringliteral">&quot;:BrokenIRC NICK %s\r\n&quot;</span>;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        <span class="keywordflow">if</span> (clifd)</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        <span class="keywordflow">for</span> (<a class="code" href="structt__userlist.html">t_userlist</a> *tmp = chans-&gt;<a class="code" href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">users</a>; tmp; tmp = tmp-&gt;<a class="code" href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">next</a>) {</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;                        dprintf(tmp-&gt;user-&gt;clifd, fmt, args[1]);</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        }</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        <span class="keywordflow">return</span> (chans);</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;}</div><div class="ttc" id="structt__userlist_html"><div class="ttname"><a href="structt__userlist.html">t_userlist</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00114">server.h:114</a></div></div>
<div class="ttc" id="structt__channel_html_a8097607fae5d78c98125bac6caaefe18"><div class="ttname"><a href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">t_channel::users</a></div><div class="ttdeci">t_userlist * users</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00123">server.h:123</a></div></div>
<div class="ttc" id="structt__userlist_html_a3b987a9a352379a703da737198b42d4a"><div class="ttname"><a href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">t_userlist::next</a></div><div class="ttdeci">struct s_userlist * next</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00117">server.h:117</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="ad2f830dde1e4ea8ef5e013a15cff72be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad2f830dde1e4ea8ef5e013a15cff72be">&#9670;&nbsp;</a></span>ping()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* ping </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="server_8h.html#acfbe918d8821ff3d1d8dc2c90bb8f6a2">cmdargs</a>&#160;</td>
          <td class="paramname"><em>args</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>clifd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structt__channel.html">t_channel</a> *&#160;</td>
          <td class="paramname"><em>chans</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The PING &lt;server address&gt;=""&gt; command handler </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">args</td><td>the PING arguments, composed of the above arguments </td></tr>
    <tr><td class="paramname">clifd</td><td>the client file descriptor (unusued) </td></tr>
    <tr><td class="paramname">chans</td><td>the main channel doubly linked list (unusued) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>chans the head pointer of the channel list passed in params </dd></dl>
<dl class="section note"><dt>Note</dt><dd>simply answer PONG followed by the conventionnal EOL symbol </dd></dl>

<p class="definition">Definition at line <a class="el" href="rfc__cmds0_8c_source.html#l00065">65</a> of file <a class="el" href="rfc__cmds0_8c_source.html">rfc_cmds0.c</a>.</p>
<div class="fragment"><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;{</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        <span class="keywordflow">if</span> (args || !args || chans)</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        dprintf(clifd, <span class="stringliteral">&quot;PONG\r\n&quot;</span>);</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        <span class="keywordflow">return</span> (chans);</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a id="a45c9c768c2486ac046ac242d3c46aadb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a45c9c768c2486ac046ac242d3c46aadb">&#9670;&nbsp;</a></span>print_users()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void print_users </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structt__userlist.html">t_userlist</a> *&#160;</td>
          <td class="paramname"><em>list</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Print users nick and real name stored in a <a class="el" href="structt__userlist.html">t_userlist</a> doubly linked list </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">liste</td><td>the <a class="el" href="structt__userlist.html">t_userlist</a> to print </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="logs__helpers_8c_source.html#l00030">30</a> of file <a class="el" href="logs__helpers_8c_source.html">logs_helpers.c</a>.</p>

<p class="reference">References <a class="el" href="server_8h_source.html#l00117">t_userlist::next</a>.</p>

<p class="reference">Referenced by <a class="el" href="logs__helpers_8c_source.html#l00017">print_users_in_chans()</a>.</p>
<div class="fragment"><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;{</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;        printf(<span class="stringliteral">&quot;\t\tUSERS LIST :\n&quot;</span>);</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;        <span class="keywordflow">for</span> (<a class="code" href="structt__userlist.html">t_userlist</a> *tmp = list; tmp; tmp = tmp-&gt;<a class="code" href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">next</a>) {</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;                printf(<span class="stringliteral">&quot;User : [%s], Real Name : [%s]\n&quot;</span>,</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;                tmp-&gt;user-&gt;nick, tmp-&gt;user-&gt;rname);</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        }</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        printf(<span class="stringliteral">&quot;\n&quot;</span>);</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;}</div><div class="ttc" id="structt__userlist_html"><div class="ttname"><a href="structt__userlist.html">t_userlist</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00114">server.h:114</a></div></div>
<div class="ttc" id="structt__userlist_html_a3b987a9a352379a703da737198b42d4a"><div class="ttname"><a href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">t_userlist::next</a></div><div class="ttdeci">struct s_userlist * next</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00117">server.h:117</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_a45c9c768c2486ac046ac242d3c46aadb_icgraph.png" border="0" usemap="#server_8h_a45c9c768c2486ac046ac242d3c46aadb_icgraph" alt=""/></div>
<map name="server_8h_a45c9c768c2486ac046ac242d3c46aadb_icgraph" id="server_8h_a45c9c768c2486ac046ac242d3c46aadb_icgraph">
<area shape="rect" id="node2" href="server_8h.html#a805324e4c542079956ff84a290274d23" title="print_users_in_chans" alt="" coords="140,5,285,32"/>
<area shape="rect" id="node3" href="server_8h.html#ac5949d17278df5e1ada98dca25ccd961" title="get_methods" alt="" coords="333,5,431,32"/>
<area shape="rect" id="node4" href="server__main_8c.html#a4178685c6a99dba7611faf9fe58f1a54" title="evhandler" alt="" coords="479,5,557,32"/>
<area shape="rect" id="node5" href="server__main_8c.html#a825c9cedc1751b000c44487b4233c37c" title="getactiveclients" alt="" coords="605,5,719,32"/>
<area shape="rect" id="node6" href="server__main_8c.html#af3e041546aaed3cd242c2b0e77162b39" title="server" alt="" coords="767,5,825,32"/>
<area shape="rect" id="node7" href="server__main_8c.html#a0c99d968a34e803d378692bde2e3f18f" title="main" alt="" coords="873,5,924,32"/>
</map>
</div>

</div>
</div>
<a id="a805324e4c542079956ff84a290274d23"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a805324e4c542079956ff84a290274d23">&#9670;&nbsp;</a></span>print_users_in_chans()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void print_users_in_chans </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structt__channel.html">t_channel</a> *&#160;</td>
          <td class="paramname"><em>chanlist</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Print each channel in list with its users </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">chanlist</td><td>the channels doubly linked list </td></tr>
    <tr><td class="paramname">index</td><td>the received command index to avoid printing each time a PING cmd is received (too much log ;)) </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="logs__helpers_8c_source.html#l00017">17</a> of file <a class="el" href="logs__helpers_8c_source.html">logs_helpers.c</a>.</p>

<p class="reference">References <a class="el" href="server_8h_source.html#l00125">t_channel::next</a>, <a class="el" href="server_8h_source.html#l00054">PING</a>, and <a class="el" href="logs__helpers_8c_source.html#l00030">print_users()</a>.</p>

<p class="reference">Referenced by <a class="el" href="commands__parsing_8c_source.html#l00073">get_methods()</a>.</p>
<div class="fragment"><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;{</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;        <span class="keywordflow">if</span> (index != <a class="code" href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa3a95ef902bc659901cceef98e0bc8041">PING</a>) {</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;                <span class="keywordflow">for</span> (<a class="code" href="structt__channel.html">t_channel</a> *tmp = chanlist; tmp; tmp = tmp-&gt;<a class="code" href="structt__channel.html#ad735fa416150cd0bbd1ce42e82a1c1fa">next</a>) {</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;                        printf(<span class="stringliteral">&quot;\tChannel : [%s]\n&quot;</span>, tmp-&gt;channame);</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;                        <a class="code" href="logs__helpers_8c.html#a45c9c768c2486ac046ac242d3c46aadb">print_users</a>(tmp-&gt;users);</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;                }</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;        }</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;}</div><div class="ttc" id="logs__helpers_8c_html_a45c9c768c2486ac046ac242d3c46aadb"><div class="ttname"><a href="logs__helpers_8c.html#a45c9c768c2486ac046ac242d3c46aadb">print_users</a></div><div class="ttdeci">void print_users(t_userlist *list)</div><div class="ttdef"><b>Definition:</b> <a href="logs__helpers_8c_source.html#l00030">logs_helpers.c:30</a></div></div>
<div class="ttc" id="structt__channel_html_ad735fa416150cd0bbd1ce42e82a1c1fa"><div class="ttname"><a href="structt__channel.html#ad735fa416150cd0bbd1ce42e82a1c1fa">t_channel::next</a></div><div class="ttdeci">struct s_channel * next</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00125">server.h:125</a></div></div>
<div class="ttc" id="structt__channel_html"><div class="ttname"><a href="structt__channel.html">t_channel</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00121">server.h:121</a></div></div>
<div class="ttc" id="server_8h_html_abfa4cf7a25ca27eb109ef9065f30581fa3a95ef902bc659901cceef98e0bc8041"><div class="ttname"><a href="server_8h.html#abfa4cf7a25ca27eb109ef9065f30581fa3a95ef902bc659901cceef98e0bc8041">PING</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00054">server.h:54</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_a805324e4c542079956ff84a290274d23_cgraph.png" border="0" usemap="#server_8h_a805324e4c542079956ff84a290274d23_cgraph" alt=""/></div>
<map name="server_8h_a805324e4c542079956ff84a290274d23_cgraph" id="server_8h_a805324e4c542079956ff84a290274d23_cgraph">
<area shape="rect" id="node2" href="logs__helpers_8c.html#a45c9c768c2486ac046ac242d3c46aadb" title="print_users" alt="" coords="199,5,285,32"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_a805324e4c542079956ff84a290274d23_icgraph.png" border="0" usemap="#server_8h_a805324e4c542079956ff84a290274d23_icgraph" alt=""/></div>
<map name="server_8h_a805324e4c542079956ff84a290274d23_icgraph" id="server_8h_a805324e4c542079956ff84a290274d23_icgraph">
<area shape="rect" id="node2" href="server_8h.html#ac5949d17278df5e1ada98dca25ccd961" title="get_methods" alt="" coords="199,5,296,32"/>
<area shape="rect" id="node3" href="server__main_8c.html#a4178685c6a99dba7611faf9fe58f1a54" title="evhandler" alt="" coords="344,5,423,32"/>
<area shape="rect" id="node4" href="server__main_8c.html#a825c9cedc1751b000c44487b4233c37c" title="getactiveclients" alt="" coords="471,5,584,32"/>
<area shape="rect" id="node5" href="server__main_8c.html#af3e041546aaed3cd242c2b0e77162b39" title="server" alt="" coords="632,5,691,32"/>
<area shape="rect" id="node6" href="server__main_8c.html#a0c99d968a34e803d378692bde2e3f18f" title="main" alt="" coords="739,5,789,32"/>
</map>
</div>

</div>
</div>
<a id="aa5da766def7467ba7a3899fddbfcd278"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa5da766def7467ba7a3899fddbfcd278">&#9670;&nbsp;</a></span>privmsg()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* privmsg </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="server_8h.html#acfbe918d8821ff3d1d8dc2c90bb8f6a2">cmdargs</a>&#160;</td>
          <td class="paramname"><em>args</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>clifd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structt__channel.html">t_channel</a> *&#160;</td>
          <td class="paramname"><em>chans</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The PRIVMSG &lt;msgtarget&gt; &lt;message&gt; command </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">args</td><td>the PRIVMSG arguments, see above </td></tr>
    <tr><td class="paramname">clifd</td><td>the client file descriptor </td></tr>
    <tr><td class="paramname">chans</td><td>the main channel doubly linked list (updated if new channel) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>chans the head pointer of the channel list passed in params </dd></dl>
<dl class="section note"><dt>Note</dt><dd>as <a class="el" href="commands__parsing_8c.html#ad7cc037b9642ffd85e521546772eceae">get_args()</a> split by space we need to reconstruct the original message with the <a class="el" href="rfc__cmds1_8c.html#a67423079c85c9a88a611514cd9558865">get_full_msg()</a> method </dd></dl>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>for now, message can only be sent to a channel , missing the message a user function </dd></dl>

<p class="definition">Definition at line <a class="el" href="rfc__cmds1_8c_source.html#l00054">54</a> of file <a class="el" href="rfc__cmds1_8c_source.html">rfc_cmds1.c</a>.</p>

<p class="reference">References <a class="el" href="rfc__cmds1_8c_source.html#l00030">broadcast_msg()</a>, <a class="el" href="server_8h_source.html#l00106">t_user::clifd</a>, <a class="el" href="lists__helpers_8c_source.html#l00026">find_user_by_fd()</a>, <a class="el" href="lists__helpers_8c_source.html#l00072">find_user_by_name()</a>, <a class="el" href="lists__helpers_8c_source.html#l00044">get_chan_by_name()</a>, <a class="el" href="rfc__cmds1_8c_source.html#l00018">get_full_msg()</a>, <a class="el" href="server_8h_source.html#l00108">t_user::nick</a>, and <a class="el" href="server_8h_source.html#l00123">t_channel::users</a>.</p>
<div class="fragment"><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;{</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        <a class="code" href="structt__user.html">t_user</a> *from = <a class="code" href="lists__helpers_8c.html#a0195cd48a4c52a9624a811825cef8afb">find_user_by_fd</a>(chans-&gt;<a class="code" href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">users</a>, clifd);</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <a class="code" href="structt__channel.html">t_channel</a> *reqchan = <a class="code" href="lists__helpers_8c.html#ae86be37e5d76544c9d6feb9d7b9b6b02">get_chan_by_name</a>(chans, args[1]);</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <a class="code" href="structt__user.html">t_user</a> *to = reqchan ? NULL : <a class="code" href="lists__helpers_8c.html#a7ebf668b9cfc31f3b29114dfed75c0ad">find_user_by_name</a>(args[1], chans-&gt;<a class="code" href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">users</a>);</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <span class="keywordtype">char</span> *message[3] = { <a class="code" href="rfc__cmds1_8c.html#a67423079c85c9a88a611514cd9558865">get_full_msg</a>(args), from-&gt;<a class="code" href="structt__user.html#ae26ce5e41546b895d8d85f3cde41c096">nick</a>, args[1] };</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        <span class="keywordflow">if</span> (reqchan) {</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;                <a class="code" href="rfc__cmds1_8c.html#aaf538656f62d920ed911f41ea4a0f186">broadcast_msg</a>(reqchan, message, clifd);</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (to) {</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;                dprintf(to-&gt;<a class="code" href="structt__user.html#a29a8abb5e21ec4d86ce72c756b6b43e4">clifd</a>, <span class="stringliteral">&quot;:%s PRIVMSG %s %s\r\n&quot;</span>,</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;                        message[1], message[2], message[0]);</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;        }</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        free(message[0]);</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        <span class="keywordflow">return</span> (chans);</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;}</div><div class="ttc" id="rfc__cmds1_8c_html_a67423079c85c9a88a611514cd9558865"><div class="ttname"><a href="rfc__cmds1_8c.html#a67423079c85c9a88a611514cd9558865">get_full_msg</a></div><div class="ttdeci">static char * get_full_msg(char **args)</div><div class="ttdef"><b>Definition:</b> <a href="rfc__cmds1_8c_source.html#l00018">rfc_cmds1.c:18</a></div></div>
<div class="ttc" id="lists__helpers_8c_html_a0195cd48a4c52a9624a811825cef8afb"><div class="ttname"><a href="lists__helpers_8c.html#a0195cd48a4c52a9624a811825cef8afb">find_user_by_fd</a></div><div class="ttdeci">t_user * find_user_by_fd(t_userlist *list, int clifd)</div><div class="ttdef"><b>Definition:</b> <a href="lists__helpers_8c_source.html#l00026">lists_helpers.c:26</a></div></div>
<div class="ttc" id="structt__channel_html_a8097607fae5d78c98125bac6caaefe18"><div class="ttname"><a href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">t_channel::users</a></div><div class="ttdeci">t_userlist * users</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00123">server.h:123</a></div></div>
<div class="ttc" id="structt__user_html"><div class="ttname"><a href="structt__user.html">t_user</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00105">server.h:105</a></div></div>
<div class="ttc" id="structt__channel_html"><div class="ttname"><a href="structt__channel.html">t_channel</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00121">server.h:121</a></div></div>
<div class="ttc" id="lists__helpers_8c_html_ae86be37e5d76544c9d6feb9d7b9b6b02"><div class="ttname"><a href="lists__helpers_8c.html#ae86be37e5d76544c9d6feb9d7b9b6b02">get_chan_by_name</a></div><div class="ttdeci">t_channel * get_chan_by_name(t_channel *list, char *channame)</div><div class="ttdef"><b>Definition:</b> <a href="lists__helpers_8c_source.html#l00044">lists_helpers.c:44</a></div></div>
<div class="ttc" id="rfc__cmds1_8c_html_aaf538656f62d920ed911f41ea4a0f186"><div class="ttname"><a href="rfc__cmds1_8c.html#aaf538656f62d920ed911f41ea4a0f186">broadcast_msg</a></div><div class="ttdeci">void * broadcast_msg(t_channel *reqchan, char **message, int clifd)</div><div class="ttdef"><b>Definition:</b> <a href="rfc__cmds1_8c_source.html#l00030">rfc_cmds1.c:30</a></div></div>
<div class="ttc" id="structt__user_html_a29a8abb5e21ec4d86ce72c756b6b43e4"><div class="ttname"><a href="structt__user.html#a29a8abb5e21ec4d86ce72c756b6b43e4">t_user::clifd</a></div><div class="ttdeci">int clifd</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00106">server.h:106</a></div></div>
<div class="ttc" id="lists__helpers_8c_html_a7ebf668b9cfc31f3b29114dfed75c0ad"><div class="ttname"><a href="lists__helpers_8c.html#a7ebf668b9cfc31f3b29114dfed75c0ad">find_user_by_name</a></div><div class="ttdeci">t_user * find_user_by_name(const char *name, t_userlist *usrs)</div><div class="ttdef"><b>Definition:</b> <a href="lists__helpers_8c_source.html#l00072">lists_helpers.c:72</a></div></div>
<div class="ttc" id="structt__user_html_ae26ce5e41546b895d8d85f3cde41c096"><div class="ttname"><a href="structt__user.html#ae26ce5e41546b895d8d85f3cde41c096">t_user::nick</a></div><div class="ttdeci">char * nick</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00108">server.h:108</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_aa5da766def7467ba7a3899fddbfcd278_cgraph.png" border="0" usemap="#server_8h_aa5da766def7467ba7a3899fddbfcd278_cgraph" alt=""/></div>
<map name="server_8h_aa5da766def7467ba7a3899fddbfcd278_cgraph" id="server_8h_aa5da766def7467ba7a3899fddbfcd278_cgraph">
<area shape="rect" id="node2" href="rfc__cmds1_8c.html#aaf538656f62d920ed911f41ea4a0f186" title="broadcast_msg" alt="" coords="133,5,244,32"/>
<area shape="rect" id="node3" href="lists__helpers_8c.html#a0195cd48a4c52a9624a811825cef8afb" title="find_user_by_fd" alt="" coords="131,56,246,83"/>
<area shape="rect" id="node4" href="lists__helpers_8c.html#a7ebf668b9cfc31f3b29114dfed75c0ad" title="find_user_by_name" alt="" coords="121,107,256,133"/>
<area shape="rect" id="node5" href="lists__helpers_8c.html#ae86be37e5d76544c9d6feb9d7b9b6b02" title="get_chan_by_name" alt="" coords="121,157,256,184"/>
<area shape="rect" id="node6" href="rfc__cmds1_8c.html#a67423079c85c9a88a611514cd9558865" title="get_full_msg" alt="" coords="141,208,237,235"/>
</map>
</div>

</div>
</div>
<a id="a8a966c4254db49b02978407670cc9fa9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8a966c4254db49b02978407670cc9fa9">&#9670;&nbsp;</a></span>quit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* quit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="server_8h.html#acfbe918d8821ff3d1d8dc2c90bb8f6a2">cmdargs</a>&#160;</td>
          <td class="paramname"><em>args</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>clifd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structt__channel.html">t_channel</a> *&#160;</td>
          <td class="paramname"><em>chans</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The QUIT &lt;quit message&gt;=""&gt; command handler </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">args</td><td>the QUIT arguments, composed of the above args </td></tr>
    <tr><td class="paramname">clifd</td><td>the client file descriptor </td></tr>
    <tr><td class="paramname">chans</td><td>the main channel doubly linked list (updated if new channel) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>chans the head pointer of the channel list passed in params </dd></dl>
<dl class="section note"><dt>Note</dt><dd>still a bit buggy on the <a class="el" href="user__list_8c.html#a4b707a3b8d0f77075ea567c4718c4c06">remove_user()</a> part (run and see by urself) </dd></dl>

<p class="definition">Definition at line <a class="el" href="rfc__cmds0_8c_source.html#l00101">101</a> of file <a class="el" href="rfc__cmds0_8c_source.html">rfc_cmds0.c</a>.</p>

<p class="reference">References <a class="el" href="lists__helpers_8c_source.html#l00026">find_user_by_fd()</a>, <a class="el" href="lists__helpers_8c_source.html#l00057">is_user_in_chan()</a>, <a class="el" href="server_8h_source.html#l00117">t_userlist::next</a>, <a class="el" href="server_8h_source.html#l00125">t_channel::next</a>, <a class="el" href="server_8h_source.html#l00108">t_user::nick</a>, and <a class="el" href="server_8h_source.html#l00123">t_channel::users</a>.</p>
<div class="fragment"><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;{</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        <a class="code" href="structt__user.html">t_user</a> *usr = <a class="code" href="lists__helpers_8c.html#a0195cd48a4c52a9624a811825cef8afb">find_user_by_fd</a>(chans-&gt;<a class="code" href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">users</a>, clifd);</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        <span class="keywordflow">for</span> (<a class="code" href="structt__userlist.html">t_userlist</a> *b = chans-&gt;<a class="code" href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">users</a>; b; b = b-&gt;<a class="code" href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">next</a>) {</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;                dprintf(b-&gt;user-&gt;clifd, <span class="stringliteral">&quot;:%s QUIT :%s\r\n&quot;</span>, usr-&gt;<a class="code" href="structt__user.html#ae26ce5e41546b895d8d85f3cde41c096">nick</a>, args[1]);</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        }</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        <span class="keywordflow">for</span> (<a class="code" href="structt__channel.html">t_channel</a> *chan = chans; chan; chan = chan-&gt;<a class="code" href="structt__channel.html#ad735fa416150cd0bbd1ce42e82a1c1fa">next</a>) {</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;                <a class="code" href="lists__helpers_8c.html#af9f57eda934151d707615e8f315e7897">is_user_in_chan</a>(clifd, chan);</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        }</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        close(clifd);</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        <span class="keywordflow">return</span> (chans);</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;}</div><div class="ttc" id="structt__userlist_html"><div class="ttname"><a href="structt__userlist.html">t_userlist</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00114">server.h:114</a></div></div>
<div class="ttc" id="lists__helpers_8c_html_a0195cd48a4c52a9624a811825cef8afb"><div class="ttname"><a href="lists__helpers_8c.html#a0195cd48a4c52a9624a811825cef8afb">find_user_by_fd</a></div><div class="ttdeci">t_user * find_user_by_fd(t_userlist *list, int clifd)</div><div class="ttdef"><b>Definition:</b> <a href="lists__helpers_8c_source.html#l00026">lists_helpers.c:26</a></div></div>
<div class="ttc" id="structt__channel_html_a8097607fae5d78c98125bac6caaefe18"><div class="ttname"><a href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">t_channel::users</a></div><div class="ttdeci">t_userlist * users</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00123">server.h:123</a></div></div>
<div class="ttc" id="structt__channel_html_ad735fa416150cd0bbd1ce42e82a1c1fa"><div class="ttname"><a href="structt__channel.html#ad735fa416150cd0bbd1ce42e82a1c1fa">t_channel::next</a></div><div class="ttdeci">struct s_channel * next</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00125">server.h:125</a></div></div>
<div class="ttc" id="structt__user_html"><div class="ttname"><a href="structt__user.html">t_user</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00105">server.h:105</a></div></div>
<div class="ttc" id="structt__channel_html"><div class="ttname"><a href="structt__channel.html">t_channel</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00121">server.h:121</a></div></div>
<div class="ttc" id="lists__helpers_8c_html_af9f57eda934151d707615e8f315e7897"><div class="ttname"><a href="lists__helpers_8c.html#af9f57eda934151d707615e8f315e7897">is_user_in_chan</a></div><div class="ttdeci">unsigned int is_user_in_chan(int clifd, t_channel *chans)</div><div class="ttdef"><b>Definition:</b> <a href="lists__helpers_8c_source.html#l00057">lists_helpers.c:57</a></div></div>
<div class="ttc" id="structt__userlist_html_a3b987a9a352379a703da737198b42d4a"><div class="ttname"><a href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">t_userlist::next</a></div><div class="ttdeci">struct s_userlist * next</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00117">server.h:117</a></div></div>
<div class="ttc" id="structt__user_html_ae26ce5e41546b895d8d85f3cde41c096"><div class="ttname"><a href="structt__user.html#ae26ce5e41546b895d8d85f3cde41c096">t_user::nick</a></div><div class="ttdeci">char * nick</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00108">server.h:108</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_a8a966c4254db49b02978407670cc9fa9_cgraph.png" border="0" usemap="#server_8h_a8a966c4254db49b02978407670cc9fa9_cgraph" alt=""/></div>
<map name="server_8h_a8a966c4254db49b02978407670cc9fa9_cgraph" id="server_8h_a8a966c4254db49b02978407670cc9fa9_cgraph">
<area shape="rect" id="node2" href="lists__helpers_8c.html#a0195cd48a4c52a9624a811825cef8afb" title="find_user_by_fd" alt="" coords="97,5,211,32"/>
<area shape="rect" id="node3" href="lists__helpers_8c.html#af9f57eda934151d707615e8f315e7897" title="is_user_in_chan" alt="" coords="96,56,212,83"/>
</map>
</div>

</div>
</div>
<a id="ade7cba4847a297abf811114846d62cac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade7cba4847a297abf811114846d62cac">&#9670;&nbsp;</a></span>remove_channel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void remove_channel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structt__channel.html">t_channel</a> *&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>channame</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Remove a channel element from the doubly linked list </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>the userlist to be updated </td></tr>
    <tr><td class="paramname">channame</td><td>the channel name to be deleted </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="channel__list_8c_source.html#l00053">53</a> of file <a class="el" href="channel__list_8c_source.html">channel_list.c</a>.</p>

<p class="reference">References <a class="el" href="server_8h_source.html#l00122">t_channel::channame</a>, <a class="el" href="user__list_8c_source.html#l00098">free_userlist()</a>, <a class="el" href="server_8h_source.html#l00125">t_channel::next</a>, <a class="el" href="server_8h_source.html#l00124">t_channel::prev</a>, and <a class="el" href="server_8h_source.html#l00123">t_channel::users</a>.</p>
<div class="fragment"><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;{</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        <a class="code" href="structt__channel.html">t_channel</a> *tmp = list;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <span class="keywordflow">while</span> (tmp-&gt;<a class="code" href="structt__channel.html#ad735fa416150cd0bbd1ce42e82a1c1fa">next</a> != NULL)</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        {</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;                <span class="keywordflow">if</span> (!strcmp(tmp-&gt;<a class="code" href="structt__channel.html#a8d701df6c8b899848e450905cf1e70dd">channame</a>, channame)) {</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;                        tmp-&gt;<a class="code" href="structt__channel.html#abfb3b9e078736d58b484451cab52671c">prev</a>-&gt;next = tmp-&gt;<a class="code" href="structt__channel.html#ad735fa416150cd0bbd1ce42e82a1c1fa">next</a>;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;                        tmp-&gt;<a class="code" href="structt__channel.html#ad735fa416150cd0bbd1ce42e82a1c1fa">next</a>-&gt;prev = tmp-&gt;<a class="code" href="structt__channel.html#abfb3b9e078736d58b484451cab52671c">prev</a>;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;                        <a class="code" href="user__list_8c.html#af00c364b53de2b369d1ba7339975afa0">free_userlist</a>(tmp-&gt;<a class="code" href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">users</a>);</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;                        free(tmp-&gt;<a class="code" href="structt__channel.html#a8d701df6c8b899848e450905cf1e70dd">channame</a>);</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;                        free(tmp);</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;                        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;                }</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;                tmp = tmp-&gt;<a class="code" href="structt__channel.html#ad735fa416150cd0bbd1ce42e82a1c1fa">next</a>;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        }</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;}</div><div class="ttc" id="structt__channel_html_abfb3b9e078736d58b484451cab52671c"><div class="ttname"><a href="structt__channel.html#abfb3b9e078736d58b484451cab52671c">t_channel::prev</a></div><div class="ttdeci">struct s_channel * prev</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00124">server.h:124</a></div></div>
<div class="ttc" id="structt__channel_html_a8097607fae5d78c98125bac6caaefe18"><div class="ttname"><a href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">t_channel::users</a></div><div class="ttdeci">t_userlist * users</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00123">server.h:123</a></div></div>
<div class="ttc" id="structt__channel_html_ad735fa416150cd0bbd1ce42e82a1c1fa"><div class="ttname"><a href="structt__channel.html#ad735fa416150cd0bbd1ce42e82a1c1fa">t_channel::next</a></div><div class="ttdeci">struct s_channel * next</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00125">server.h:125</a></div></div>
<div class="ttc" id="structt__channel_html"><div class="ttname"><a href="structt__channel.html">t_channel</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00121">server.h:121</a></div></div>
<div class="ttc" id="structt__channel_html_a8d701df6c8b899848e450905cf1e70dd"><div class="ttname"><a href="structt__channel.html#a8d701df6c8b899848e450905cf1e70dd">t_channel::channame</a></div><div class="ttdeci">char * channame</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00122">server.h:122</a></div></div>
<div class="ttc" id="user__list_8c_html_af00c364b53de2b369d1ba7339975afa0"><div class="ttname"><a href="user__list_8c.html#af00c364b53de2b369d1ba7339975afa0">free_userlist</a></div><div class="ttdeci">void free_userlist(t_userlist *list)</div><div class="ttdef"><b>Definition:</b> <a href="user__list_8c_source.html#l00098">user_list.c:98</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_ade7cba4847a297abf811114846d62cac_cgraph.png" border="0" usemap="#server_8h_ade7cba4847a297abf811114846d62cac_cgraph" alt=""/></div>
<map name="server_8h_ade7cba4847a297abf811114846d62cac_cgraph" id="server_8h_ade7cba4847a297abf811114846d62cac_cgraph">
<area shape="rect" id="node2" href="user__list_8c.html#af00c364b53de2b369d1ba7339975afa0" title="free_userlist" alt="" coords="171,5,264,32"/>
</map>
</div>

</div>
</div>
<a id="a4b707a3b8d0f77075ea567c4718c4c06"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b707a3b8d0f77075ea567c4718c4c06">&#9670;&nbsp;</a></span>remove_user()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* remove_user </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structt__userlist.html">t_userlist</a> *&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>clifd</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Remove a user from a userlist </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>the userlist to be updated </td></tr>
    <tr><td class="paramname">clifd</td><td>the clientfd as index for element to be removed </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>list the updated userlist </dd></dl>

<p class="definition">Definition at line <a class="el" href="user__list_8c_source.html#l00073">73</a> of file <a class="el" href="user__list_8c_source.html">user_list.c</a>.</p>

<p class="reference">References <a class="el" href="server_8h_source.html#l00106">t_user::clifd</a>, <a class="el" href="server_8h_source.html#l00117">t_userlist::next</a>, <a class="el" href="server_8h_source.html#l00108">t_user::nick</a>, <a class="el" href="server_8h_source.html#l00116">t_userlist::prev</a>, <a class="el" href="server_8h_source.html#l00109">t_user::rname</a>, and <a class="el" href="server_8h_source.html#l00115">t_userlist::user</a>.</p>
<div class="fragment"><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;{</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        <a class="code" href="structt__userlist.html">t_userlist</a> *tmp = list;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        <span class="keywordflow">while</span> (tmp) {</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;                <span class="keywordflow">if</span> (tmp-&gt;<a class="code" href="structt__userlist.html#a946f5b9e4c5110372550989a019ce21b">user</a>-&gt;<a class="code" href="structt__user.html#a29a8abb5e21ec4d86ce72c756b6b43e4">clifd</a> == clifd) {</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;                        tmp-&gt;<a class="code" href="structt__userlist.html#a0d21cffe5acee2678380dd0ebf7ae85c">prev</a>-&gt;next = tmp-&gt;<a class="code" href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">next</a>;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;                        <span class="keywordflow">if</span> (tmp-&gt;<a class="code" href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">next</a>)</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;                                tmp-&gt;<a class="code" href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">next</a>-&gt;prev = tmp-&gt;<a class="code" href="structt__userlist.html#a0d21cffe5acee2678380dd0ebf7ae85c">prev</a>;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;                        <span class="keywordflow">else</span></div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;                                tmp-&gt;<a class="code" href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">next</a> = NULL;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;                        free(tmp-&gt;<a class="code" href="structt__userlist.html#a946f5b9e4c5110372550989a019ce21b">user</a>-&gt;<a class="code" href="structt__user.html#ab3e2136d7c7ee26a1403bb5fc7f48d8e">rname</a>);</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;                        free(tmp-&gt;<a class="code" href="structt__userlist.html#a946f5b9e4c5110372550989a019ce21b">user</a>-&gt;<a class="code" href="structt__user.html#ae26ce5e41546b895d8d85f3cde41c096">nick</a>);</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;                        free(tmp-&gt;<a class="code" href="structt__userlist.html#a946f5b9e4c5110372550989a019ce21b">user</a>);</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;                        free(tmp);</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;                        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;                }</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;                tmp = tmp-&gt;<a class="code" href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">next</a>;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        }</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        <span class="keywordflow">return</span> (list);</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;}</div><div class="ttc" id="structt__userlist_html"><div class="ttname"><a href="structt__userlist.html">t_userlist</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00114">server.h:114</a></div></div>
<div class="ttc" id="structt__user_html_ab3e2136d7c7ee26a1403bb5fc7f48d8e"><div class="ttname"><a href="structt__user.html#ab3e2136d7c7ee26a1403bb5fc7f48d8e">t_user::rname</a></div><div class="ttdeci">char * rname</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00109">server.h:109</a></div></div>
<div class="ttc" id="structt__userlist_html_a946f5b9e4c5110372550989a019ce21b"><div class="ttname"><a href="structt__userlist.html#a946f5b9e4c5110372550989a019ce21b">t_userlist::user</a></div><div class="ttdeci">t_user * user</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00115">server.h:115</a></div></div>
<div class="ttc" id="structt__userlist_html_a0d21cffe5acee2678380dd0ebf7ae85c"><div class="ttname"><a href="structt__userlist.html#a0d21cffe5acee2678380dd0ebf7ae85c">t_userlist::prev</a></div><div class="ttdeci">struct s_userlist * prev</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00116">server.h:116</a></div></div>
<div class="ttc" id="structt__user_html_a29a8abb5e21ec4d86ce72c756b6b43e4"><div class="ttname"><a href="structt__user.html#a29a8abb5e21ec4d86ce72c756b6b43e4">t_user::clifd</a></div><div class="ttdeci">int clifd</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00106">server.h:106</a></div></div>
<div class="ttc" id="structt__userlist_html_a3b987a9a352379a703da737198b42d4a"><div class="ttname"><a href="structt__userlist.html#a3b987a9a352379a703da737198b42d4a">t_userlist::next</a></div><div class="ttdeci">struct s_userlist * next</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00117">server.h:117</a></div></div>
<div class="ttc" id="structt__user_html_ae26ce5e41546b895d8d85f3cde41c096"><div class="ttname"><a href="structt__user.html#ae26ce5e41546b895d8d85f3cde41c096">t_user::nick</a></div><div class="ttdeci">char * nick</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00108">server.h:108</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="aa9bc3ff8e7f409540f85b3cc97636500"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa9bc3ff8e7f409540f85b3cc97636500">&#9670;&nbsp;</a></span>set_clifd()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int set_clifd </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>clisock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>epollfd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct epoll_event *&#160;</td>
          <td class="paramname"><em>ev</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Add the new client file descriptor in struct epoll_event structure for polling their events  read <a href="https://bit.ly/2gOr7gr">this</a> medium blog post on 'epoll madness' </p>

<p class="definition">Definition at line <a class="el" href="server__init_8c_source.html#l00018">18</a> of file <a class="el" href="server__init_8c_source.html">server_init.c</a>.</p>

<p class="reference">Referenced by <a class="el" href="server__main_8c_source.html#l00020">initco()</a>.</p>
<div class="fragment"><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;{</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        <span class="keywordtype">int</span> rt = 0;</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;        <span class="keywordtype">int</span> op = EPOLL_CTL_ADD;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;        ev-&gt;events = EPOLLIN | EPOLLET;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;        ev-&gt;data.fd = clisock;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;        <span class="keywordflow">if</span> (epoll_ctl(epollfd, op, clisock, ev) == -1) {</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;                perror(<span class="stringliteral">&quot;set_clifd: epoll_ctl:&quot;</span>);</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;                rt = 84;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;        }</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;        fprintf(stderr, <span class="stringliteral">&quot;Add client n°[%d] to epoll interest list\n&quot;</span>, clisock);</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;        <span class="keywordflow">return</span> (rt);</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;}</div></div><!-- fragment --><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_aa9bc3ff8e7f409540f85b3cc97636500_icgraph.png" border="0" usemap="#server_8h_aa9bc3ff8e7f409540f85b3cc97636500_icgraph" alt=""/></div>
<map name="server_8h_aa9bc3ff8e7f409540f85b3cc97636500_icgraph" id="server_8h_aa9bc3ff8e7f409540f85b3cc97636500_icgraph">
<area shape="rect" id="node2" href="server__main_8c.html#a01aa22f887842d97133af9b3f2cf4a7c" title="initco" alt="" coords="124,5,177,32"/>
<area shape="rect" id="node3" href="server__main_8c.html#a825c9cedc1751b000c44487b4233c37c" title="getactiveclients" alt="" coords="225,5,339,32"/>
<area shape="rect" id="node4" href="server__main_8c.html#af3e041546aaed3cd242c2b0e77162b39" title="server" alt="" coords="387,5,445,32"/>
<area shape="rect" id="node5" href="server__main_8c.html#a0c99d968a34e803d378692bde2e3f18f" title="main" alt="" coords="493,5,544,32"/>
</map>
</div>

</div>
</div>
<a id="a5cb15d408ef32c09c2485937503438ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5cb15d408ef32c09c2485937503438ed">&#9670;&nbsp;</a></span>set_epoll()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int set_epoll </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structt__serv.html">t_serv</a> *&#160;</td>
          <td class="paramname"><em>all</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Epoll IO handler initialisation</p><ul>
<li>declare an epoll fd with epoll_create()</li>
<li>set event handling to EPOLLIN (check <code>man epoll</code>)</li>
<li>register server listening fd on ev structure </li>
</ul>

<p class="definition">Definition at line <a class="el" href="server__init_8c_source.html#l00059">59</a> of file <a class="el" href="server__init_8c_source.html">server_init.c</a>.</p>

<p class="reference">References <a class="el" href="server_8h_source.html#l00087">t_serv::epollfd</a>, <a class="el" href="server_8h_source.html#l00097">t_serv::ev</a>, and <a class="el" href="server_8h_source.html#l00089">t_serv::listen_sock</a>.</p>

<p class="reference">Referenced by <a class="el" href="server__main_8c_source.html#l00096">server()</a>.</p>
<div class="fragment"><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;{</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        <span class="keywordtype">int</span> rt = 0;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        all-&gt;<a class="code" href="structt__serv.html#a46bee037324e9deec26f15fbc4f6d8e5">epollfd</a> = epoll_create(10);</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        memset(&amp;all-&gt;<a class="code" href="structt__serv.html#aa95442079d9e7a2294ad8df1335ae0f4">ev</a>, 0, <span class="keyword">sizeof</span>(all-&gt;<a class="code" href="structt__serv.html#aa95442079d9e7a2294ad8df1335ae0f4">ev</a>));</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        <span class="keywordflow">if</span> (all-&gt;<a class="code" href="structt__serv.html#a46bee037324e9deec26f15fbc4f6d8e5">epollfd</a> == -1) {</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;                perror(<span class="stringliteral">&quot;set_epoll: epoll_create1&quot;</span>);</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;                rt = 84;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;                all-&gt;<a class="code" href="structt__serv.html#aa95442079d9e7a2294ad8df1335ae0f4">ev</a>.events = EPOLLIN;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;                all-&gt;<a class="code" href="structt__serv.html#aa95442079d9e7a2294ad8df1335ae0f4">ev</a>.data.fd = all-&gt;<a class="code" href="structt__serv.html#ac9f24d41d8822f2c1b7df4362e18cad9">listen_sock</a>;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;                rt = epoll_ctl(all-&gt;<a class="code" href="structt__serv.html#a46bee037324e9deec26f15fbc4f6d8e5">epollfd</a>, EPOLL_CTL_ADD, all-&gt;<a class="code" href="structt__serv.html#ac9f24d41d8822f2c1b7df4362e18cad9">listen_sock</a>,</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;                        &amp;all-&gt;<a class="code" href="structt__serv.html#aa95442079d9e7a2294ad8df1335ae0f4">ev</a>);</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;                <span class="keywordflow">if</span> (rt == -1) {</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;                        perror(<span class="stringliteral">&quot;set_epoll: epoll_ctl&quot;</span>);</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;                        rt = 84;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;                }</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        }</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <span class="keywordflow">return</span> (rt);</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;}</div><div class="ttc" id="structt__serv_html_ac9f24d41d8822f2c1b7df4362e18cad9"><div class="ttname"><a href="structt__serv.html#ac9f24d41d8822f2c1b7df4362e18cad9">t_serv::listen_sock</a></div><div class="ttdeci">int listen_sock</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00089">server.h:89</a></div></div>
<div class="ttc" id="structt__serv_html_a46bee037324e9deec26f15fbc4f6d8e5"><div class="ttname"><a href="structt__serv.html#a46bee037324e9deec26f15fbc4f6d8e5">t_serv::epollfd</a></div><div class="ttdeci">int epollfd</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00087">server.h:87</a></div></div>
<div class="ttc" id="structt__serv_html_aa95442079d9e7a2294ad8df1335ae0f4"><div class="ttname"><a href="structt__serv.html#aa95442079d9e7a2294ad8df1335ae0f4">t_serv::ev</a></div><div class="ttdeci">struct epoll_event ev</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00097">server.h:97</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_a5cb15d408ef32c09c2485937503438ed_icgraph.png" border="0" usemap="#server_8h_a5cb15d408ef32c09c2485937503438ed_icgraph" alt=""/></div>
<map name="server_8h_a5cb15d408ef32c09c2485937503438ed_icgraph" id="server_8h_a5cb15d408ef32c09c2485937503438ed_icgraph">
<area shape="rect" id="node2" href="server__main_8c.html#af3e041546aaed3cd242c2b0e77162b39" title="server" alt="" coords="128,5,187,32"/>
<area shape="rect" id="node3" href="server__main_8c.html#a0c99d968a34e803d378692bde2e3f18f" title="main" alt="" coords="235,5,285,32"/>
</map>
</div>

</div>
</div>
<a id="a3802a71fa34e93cb1d85f919914f5abf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3802a71fa34e93cb1d85f919914f5abf">&#9670;&nbsp;</a></span>set_iface()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int set_iface </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="server_8h.html#aa62dc6ab378205892df275c6df156dba">adrinf</a> *&#160;</td>
          <td class="paramname"><em>hints</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="server_8h.html#aa62dc6ab378205892df275c6df156dba">adrinf</a> **&#160;</td>
          <td class="paramname"><em>res</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>port</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Listening interface setup </p>

<p class="definition">Definition at line <a class="el" href="server__init_8c_source.html#l00034">34</a> of file <a class="el" href="server__init_8c_source.html">server_init.c</a>.</p>

<p class="reference">Referenced by <a class="el" href="server__main_8c_source.html#l00096">server()</a>.</p>
<div class="fragment"><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;{</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <span class="keywordtype">int</span> rt = 0;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        memset(hints, 0, <span class="keyword">sizeof</span>(<span class="keyword">struct</span> addrinfo));</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        hints-&gt;ai_family = AF_UNSPEC;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        hints-&gt;ai_socktype = SOCK_STREAM;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;        hints-&gt;ai_flags = AI_PASSIVE;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;        hints-&gt;ai_protocol = IPPROTO_TCP;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        hints-&gt;ai_canonname = NULL;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        hints-&gt;ai_addr = NULL;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        hints-&gt;ai_next = NULL;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        <span class="keywordflow">if</span> ((getaddrinfo(NULL, port, hints, res))) {</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;                perror(<span class="stringliteral">&quot;set_iface: getaddrinfo&quot;</span>);</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;                rt = 84;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        }</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        <span class="keywordflow">return</span> (rt);</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;}</div></div><!-- fragment --><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_a3802a71fa34e93cb1d85f919914f5abf_icgraph.png" border="0" usemap="#server_8h_a3802a71fa34e93cb1d85f919914f5abf_icgraph" alt=""/></div>
<map name="server_8h_a3802a71fa34e93cb1d85f919914f5abf_icgraph" id="server_8h_a3802a71fa34e93cb1d85f919914f5abf_icgraph">
<area shape="rect" id="node2" href="server__main_8c.html#af3e041546aaed3cd242c2b0e77162b39" title="server" alt="" coords="128,5,187,32"/>
<area shape="rect" id="node3" href="server__main_8c.html#a0c99d968a34e803d378692bde2e3f18f" title="main" alt="" coords="235,5,285,32"/>
</map>
</div>

</div>
</div>
<a id="a1f61d16ccfab82b21ca40ce23feb7c02"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1f61d16ccfab82b21ca40ce23feb7c02">&#9670;&nbsp;</a></span>set_sockfd()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int set_sockfd </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structt__serv.html">t_serv</a> *&#160;</td>
          <td class="paramname"><em>all</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>See server_src/inits.c</p>
<p>Tcp Listening socket setup</p><ul>
<li>declare a socket with socket()</li>
<li>bind() to an interface</li>
<li>listen() on this fd / socket <dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">all</td><td>the 'foure tout' structure containing the struct to setup </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>sfd the configured listening socket fd or -1 if failure </dd></dl>
</li>
</ul>

<p class="definition">Definition at line <a class="el" href="server__init_8c_source.html#l00100">100</a> of file <a class="el" href="server__init_8c_source.html">server_init.c</a>.</p>

<p class="reference">References <a class="el" href="server_8h_source.html#l00020">BACKLOG</a>, <a class="el" href="server__init_8c_source.html#l00082">prevent_reused()</a>, <a class="el" href="server_8h_source.html#l00095">t_serv::res</a>, and <a class="el" href="server_8h_source.html#l00094">t_serv::rp</a>.</p>

<p class="reference">Referenced by <a class="el" href="server__main_8c_source.html#l00096">server()</a>.</p>
<div class="fragment"><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;{</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        <span class="keywordtype">int</span> sfd = -1;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        <span class="keywordflow">for</span> (all-&gt;<a class="code" href="structt__serv.html#a018d976aed4b9930a794da25a758a024">rp</a> = all-&gt;<a class="code" href="structt__serv.html#ae8783e38ef0c183366703267ca7b3298">res</a>; all-&gt;<a class="code" href="structt__serv.html#a018d976aed4b9930a794da25a758a024">rp</a> != NULL; all-&gt;<a class="code" href="structt__serv.html#a018d976aed4b9930a794da25a758a024">rp</a> = all-&gt;<a class="code" href="structt__serv.html#a018d976aed4b9930a794da25a758a024">rp</a>-&gt;ai_next) {</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;                sfd = socket(all-&gt;<a class="code" href="structt__serv.html#a018d976aed4b9930a794da25a758a024">rp</a>-&gt;ai_family, all-&gt;<a class="code" href="structt__serv.html#a018d976aed4b9930a794da25a758a024">rp</a>-&gt;ai_socktype,</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;                        all-&gt;<a class="code" href="structt__serv.html#a018d976aed4b9930a794da25a758a024">rp</a>-&gt;ai_protocol);</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;                <a class="code" href="server__init_8c.html#a381b88f843ed1ebdaa5b2a8ded74931b">prevent_reused</a>(sfd);</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;                <span class="keywordflow">if</span> (sfd == -1) {</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;                        <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;                }</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;                <span class="keywordflow">if</span> (bind(sfd, all-&gt;<a class="code" href="structt__serv.html#a018d976aed4b9930a794da25a758a024">rp</a>-&gt;ai_addr, all-&gt;<a class="code" href="structt__serv.html#a018d976aed4b9930a794da25a758a024">rp</a>-&gt;ai_addrlen) == 0) {</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;                        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;                }</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;                close(sfd);</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        }</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;        <span class="keywordflow">if</span> (all-&gt;<a class="code" href="structt__serv.html#a018d976aed4b9930a794da25a758a024">rp</a> == NULL) {</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;                fprintf(stderr, <span class="stringliteral">&quot;Could not bind\n&quot;</span>);</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((listen(sfd, <a class="code" href="server_8h.html#aeefbbafa97642defe3ee6c3080b7d66f">BACKLOG</a>) == -1)) {</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;                perror(<span class="stringliteral">&quot;listen: set_sockfd&quot;</span>);</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        }</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        <span class="keywordflow">return</span> (sfd);</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;}</div><div class="ttc" id="server_8h_html_aeefbbafa97642defe3ee6c3080b7d66f"><div class="ttname"><a href="server_8h.html#aeefbbafa97642defe3ee6c3080b7d66f">BACKLOG</a></div><div class="ttdeci">#define BACKLOG</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00020">server.h:20</a></div></div>
<div class="ttc" id="structt__serv_html_a018d976aed4b9930a794da25a758a024"><div class="ttname"><a href="structt__serv.html#a018d976aed4b9930a794da25a758a024">t_serv::rp</a></div><div class="ttdeci">adrinf * rp</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00094">server.h:94</a></div></div>
<div class="ttc" id="server__init_8c_html_a381b88f843ed1ebdaa5b2a8ded74931b"><div class="ttname"><a href="server__init_8c.html#a381b88f843ed1ebdaa5b2a8ded74931b">prevent_reused</a></div><div class="ttdeci">static void prevent_reused(int sockfd)</div><div class="ttdef"><b>Definition:</b> <a href="server__init_8c_source.html#l00082">server_init.c:82</a></div></div>
<div class="ttc" id="structt__serv_html_ae8783e38ef0c183366703267ca7b3298"><div class="ttname"><a href="structt__serv.html#ae8783e38ef0c183366703267ca7b3298">t_serv::res</a></div><div class="ttdeci">adrinf * res</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00095">server.h:95</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_a1f61d16ccfab82b21ca40ce23feb7c02_cgraph.png" border="0" usemap="#server_8h_a1f61d16ccfab82b21ca40ce23feb7c02_cgraph" alt=""/></div>
<map name="server_8h_a1f61d16ccfab82b21ca40ce23feb7c02_cgraph" id="server_8h_a1f61d16ccfab82b21ca40ce23feb7c02_cgraph">
<area shape="rect" id="node2" href="server__init_8c.html#a381b88f843ed1ebdaa5b2a8ded74931b" title="prevent_reused" alt="" coords="140,5,251,32"/>
</map>
</div>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_a1f61d16ccfab82b21ca40ce23feb7c02_icgraph.png" border="0" usemap="#server_8h_a1f61d16ccfab82b21ca40ce23feb7c02_icgraph" alt=""/></div>
<map name="server_8h_a1f61d16ccfab82b21ca40ce23feb7c02_icgraph" id="server_8h_a1f61d16ccfab82b21ca40ce23feb7c02_icgraph">
<area shape="rect" id="node2" href="server__main_8c.html#af3e041546aaed3cd242c2b0e77162b39" title="server" alt="" coords="140,5,199,32"/>
<area shape="rect" id="node3" href="server__main_8c.html#a0c99d968a34e803d378692bde2e3f18f" title="main" alt="" coords="247,5,297,32"/>
</map>
</div>

</div>
</div>
<a id="a4f31a6fd48ee5d4579ae4aaaa3cae285"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f31a6fd48ee5d4579ae4aaaa3cae285">&#9670;&nbsp;</a></span>sig_handler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sig_handler </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>signo</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>See server_src/signal_handler.c</p>
<p>Dummy signal hander to exit server properly on console with CTRL-C </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">signo</td><td>the catched signal type (hit <code>man 2 signal</code>) </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="sig__handler_8c_source.html#l00015">15</a> of file <a class="el" href="sig__handler_8c_source.html">sig_handler.c</a>.</p>

<p class="reference">Referenced by <a class="el" href="server__main_8c_source.html#l00124">main()</a>.</p>
<div class="fragment"><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;{</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;        <span class="keywordflow">if</span> (signo == SIGINT) {</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;                printf(<span class="stringliteral">&quot;\nReceived SIGINT\n\tSee u !..\n&quot;</span>);</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;                exit(0);</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        }</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;}</div></div><!-- fragment --><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_a4f31a6fd48ee5d4579ae4aaaa3cae285_icgraph.png" border="0" usemap="#server_8h_a4f31a6fd48ee5d4579ae4aaaa3cae285_icgraph" alt=""/></div>
<map name="server_8h_a4f31a6fd48ee5d4579ae4aaaa3cae285_icgraph" id="server_8h_a4f31a6fd48ee5d4579ae4aaaa3cae285_icgraph">
<area shape="rect" id="node2" href="server__main_8c.html#a0c99d968a34e803d378692bde2e3f18f" title="main" alt="" coords="141,5,192,32"/>
</map>
</div>

</div>
</div>
<a id="ac36f6273cc3b6d793ac67fd4ab88fbc4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac36f6273cc3b6d793ac67fd4ab88fbc4">&#9670;&nbsp;</a></span>user()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* user </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="server_8h.html#acfbe918d8821ff3d1d8dc2c90bb8f6a2">cmdargs</a>&#160;</td>
          <td class="paramname"><em>args</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>clifd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structt__channel.html">t_channel</a> *&#160;</td>
          <td class="paramname"><em>chans</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The USER &lt;username&gt; &lt;mode&gt; &lt;unusued&gt; &lt;realname&gt; command handler </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">args</td><td>the JOIN arguments, composed of the above args </td></tr>
    <tr><td class="paramname">clifd</td><td>the client file descriptor </td></tr>
    <tr><td class="paramname">chans</td><td>the main channel doubly linked list, updated by pushback'ing the new user in chan-&gt;users list </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>chans the head pointer of the channel list passed in params </dd></dl>
<dl class="section note"><dt>Note</dt><dd>Still missing a lot of check for size, dublons etc etc and also the &lt;mode&gt; handling (invisible etc) see RFC 2812 part 3.1.3 </dd></dl>

<p class="definition">Definition at line <a class="el" href="rfc__cmds0_8c_source.html#l00081">81</a> of file <a class="el" href="rfc__cmds0_8c_source.html">rfc_cmds0.c</a>.</p>

<p class="reference">References <a class="el" href="user__list_8c_source.html#l00016">get_new_user()</a>, <a class="el" href="user__list_8c_source.html#l00034">get_new_userlist()</a>, <a class="el" href="lists__helpers_8c_source.html#l00011">get_size()</a>, <a class="el" href="user__list_8c_source.html#l00052">insert_back_user()</a>, and <a class="el" href="server_8h_source.html#l00123">t_channel::users</a>.</p>
<div class="fragment"><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;{</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        <span class="keywordtype">char</span> *banneer = <span class="stringliteral">&quot;|| Welcome to BrokenIRC Network || &quot;</span>;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="lists__helpers_8c.html#a5c9b2cd4523b5cc43326163d534225d9">get_size</a>(args) == 5) {</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;                <a class="code" href="structt__user.html">t_user</a> *usr = <a class="code" href="user__list_8c.html#ace045c243817cc0c9885bdf3b41263c0">get_new_user</a>(clifd, args);</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;                <a class="code" href="structt__userlist.html">t_userlist</a> *list = <a class="code" href="user__list_8c.html#a1cf3d818bc2607cb0f69c043dba3c039">get_new_userlist</a>(usr);</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;                chans-&gt;<a class="code" href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">users</a> = <a class="code" href="user__list_8c.html#a2b16f778b01689e31ef5530b66d41390">insert_back_user</a>(chans-&gt;<a class="code" href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">users</a>, list);</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;                dprintf(clifd, <span class="stringliteral">&quot;001 :%s %s %s\r\n&quot;</span>, args[1], args[1], banneer);</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;        }</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        <span class="keywordflow">return</span> (chans);</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;}</div><div class="ttc" id="lists__helpers_8c_html_a5c9b2cd4523b5cc43326163d534225d9"><div class="ttname"><a href="lists__helpers_8c.html#a5c9b2cd4523b5cc43326163d534225d9">get_size</a></div><div class="ttdeci">unsigned int get_size(cmdargs args)</div><div class="ttdef"><b>Definition:</b> <a href="lists__helpers_8c_source.html#l00011">lists_helpers.c:11</a></div></div>
<div class="ttc" id="user__list_8c_html_a2b16f778b01689e31ef5530b66d41390"><div class="ttname"><a href="user__list_8c.html#a2b16f778b01689e31ef5530b66d41390">insert_back_user</a></div><div class="ttdeci">void * insert_back_user(t_userlist *head, t_userlist *nuser)</div><div class="ttdef"><b>Definition:</b> <a href="user__list_8c_source.html#l00052">user_list.c:52</a></div></div>
<div class="ttc" id="structt__userlist_html"><div class="ttname"><a href="structt__userlist.html">t_userlist</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00114">server.h:114</a></div></div>
<div class="ttc" id="structt__channel_html_a8097607fae5d78c98125bac6caaefe18"><div class="ttname"><a href="structt__channel.html#a8097607fae5d78c98125bac6caaefe18">t_channel::users</a></div><div class="ttdeci">t_userlist * users</div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00123">server.h:123</a></div></div>
<div class="ttc" id="structt__user_html"><div class="ttname"><a href="structt__user.html">t_user</a></div><div class="ttdef"><b>Definition:</b> <a href="server_8h_source.html#l00105">server.h:105</a></div></div>
<div class="ttc" id="user__list_8c_html_a1cf3d818bc2607cb0f69c043dba3c039"><div class="ttname"><a href="user__list_8c.html#a1cf3d818bc2607cb0f69c043dba3c039">get_new_userlist</a></div><div class="ttdeci">t_userlist * get_new_userlist(t_user *usr)</div><div class="ttdef"><b>Definition:</b> <a href="user__list_8c_source.html#l00034">user_list.c:34</a></div></div>
<div class="ttc" id="user__list_8c_html_ace045c243817cc0c9885bdf3b41263c0"><div class="ttname"><a href="user__list_8c.html#ace045c243817cc0c9885bdf3b41263c0">get_new_user</a></div><div class="ttdeci">t_user * get_new_user(int clifd, cmdargs usercmd)</div><div class="ttdef"><b>Definition:</b> <a href="user__list_8c_source.html#l00016">user_list.c:16</a></div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="server_8h_ac36f6273cc3b6d793ac67fd4ab88fbc4_cgraph.png" border="0" usemap="#server_8h_ac36f6273cc3b6d793ac67fd4ab88fbc4_cgraph" alt=""/></div>
<map name="server_8h_ac36f6273cc3b6d793ac67fd4ab88fbc4_cgraph" id="server_8h_ac36f6273cc3b6d793ac67fd4ab88fbc4_cgraph">
<area shape="rect" id="node2" href="user__list_8c.html#ace045c243817cc0c9885bdf3b41263c0" title="get_new_user" alt="" coords="109,5,212,32"/>
<area shape="rect" id="node3" href="user__list_8c.html#a1cf3d818bc2607cb0f69c043dba3c039" title="get_new_userlist" alt="" coords="101,56,221,83"/>
<area shape="rect" id="node4" href="lists__helpers_8c.html#a5c9b2cd4523b5cc43326163d534225d9" title="get_size" alt="" coords="125,107,196,133"/>
<area shape="rect" id="node5" href="user__list_8c.html#a2b16f778b01689e31ef5530b66d41390" title="insert_back_user" alt="" coords="100,157,221,184"/>
</map>
</div>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a7bb29231b69e3767e187ffe5d5717b28"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7bb29231b69e3767e187ffe5d5717b28">&#9670;&nbsp;</a></span>G_CMDS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="server_8h.html#abc9c1e6f561b7500f7ecb3813d272d20">cmds</a> G_CMDS[<a class="el" href="server_8h.html#a9880cfe1f4eb3140da2095fd081282f5">REF_NB</a>]</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The global pointer</p>
<p>The functions pointers for the various RFC commands handlers </p>

<p class="definition">Definition at line <a class="el" href="server__decls_8c_source.html#l00018">18</a> of file <a class="el" href="server__decls_8c_source.html">server_decls.c</a>.</p>

<p class="reference">Referenced by <a class="el" href="commands__parsing_8c_source.html#l00073">get_methods()</a>.</p>

</div>
</div>
<a id="ae19e01ff7678899828036520edec313c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae19e01ff7678899828036520edec313c">&#9670;&nbsp;</a></span>G_PROTOS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* G_PROTOS[<a class="el" href="server_8h.html#a9880cfe1f4eb3140da2095fd081282f5">REF_NB</a>]</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The object prototype mapping the methods name</p>
<p>The 2D array containing the handled commands strings for comparison </p>

<p class="definition">Definition at line <a class="el" href="server__decls_8c_source.html#l00012">12</a> of file <a class="el" href="server__decls_8c_source.html">server_decls.c</a>.</p>

<p class="reference">Referenced by <a class="el" href="commands__parsing_8c_source.html#l00073">get_methods()</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
